Reports

From nuBuilderPro
Jump to: navigation, search

Once created, PDF Reports can be run from a number of places within nuBuilder.

Reports created in this section can be used by running a Javascript function called nuPrintPDF() and passing the Code of this Report record as a parameter eg nuPrintPDF('001');

Reports can also be run directly from the Run Report Button under the Setup Tab.

This will open a new Window and display the Report

Reports.png

The Fields required for creating one of these records are..

Code

The code is a unique label for the report which is used to help find the appropriate record.

Description

Used to describe and help find the appropriate record.

Group

Placing similar types of reports in the same group can be used to help find the appropriate record.

Create Temp Table

TABLE_ID is the hash variable that holds the name of the temp table containing the information for this report..

SQL SELECT Used To Create #TABLE_ID#

eg.

SELECT * FROM product
INNER JOIN zzzsys_file ON zzzsys_file_id = IFNULL(pro_image,'nuimage')
ORDER BY pro_code

OR

PHP Used To Create #TABLE_ID#

eg.


$s = "
CREATE TABLE #TABLE_ID#
SELECT * FROM product
INNER JOIN zzzsys_file ON zzzsys_file_id = IFNULL(pro_image,'nuimage')
ORDER BY pro_code";

nuRunQuery($s);

Criteria Form

A Form that allows the User to add criteria..

Between Dates.png

Report Builder

More about how to use the Report Builder can be found here.

The corresponding Report Builder page is: Report Builder Example

Report-Builder-Example.png

Fig 2, Report Builder Example

Generated-Reports-Example.png

The PHP code above and the Report Builder Example shown in Fig 2, together will form this PDF report. Example Report