Back to Documentation
nuBuilder Forte can create PDF Reports from the data stored in its database tables.
The fonts to be used in reports must be placed in tcpdf/fonts folder. The TCPDF library is in the webroot in v4 and in libs folder in v4.5. The function nuFontList() in nucommon.php file is used to load some initial fonts hardcoded as Helvetica, Courier, Times and Symbol.
There are 3 things needed to create a Report.
- An Edit or Launch Form that contains values used by the Report eg From Date and To Date.
- A Table containing data to be used by the Report.
- A Report designer to create the way this data is displayed.
These Reports will allow the user to do things like...
- Share information with others.
- Help make business decisions.
- Create invoices.
- Print graphs.
Building a Report
A unique code for this Report
The description of this Report
A field that can be used to help organise Reports.
A Table can be created in 3 different ways.
- A single table. - (nuTABLE)
- An SQL statement created with the SQL Builder. - (nuSQL)
- A PHP Procedure.
A Procedure will only appear in this list if #TABLE_ID# is found somewhere within it.
The point of using a Procedures is to create a temporary table that can be manipulated before it is used by the Report.
(If a nuTABLE or a nuSQL table is chosen, this temporary table is created automatically)
The temp table created must be called #TABLE_ID#.
#TABLE_ID# simply gets replaced by the name of a temporary table, created by nuBuilder, that will be used by the Report.
It works the same way as other Hash Cookies.
$s = " SELECT sta_last_name, sta_initials, sta_games, sta_runs, sta_captain, CONCAT(sta_last_name, ',', sta_initials) AS full_name, 1 AS player FROM stats "; nuRunQuery("CREATE TABLE #TABLE_ID# $s");
A Launch Form will allow..
- The user to define the information to be stored in the table that will be used by the report.
- Run the Report from an Action Button at the top of the Form.
nuBuilder Forte has its own Report Designer.
Running A Report
There are 2 ways to launch a Report.