User Guide

Table Of Contents
782 Chapter 32: Creating Reports for Printing
Defining, modifying, and using fields and input parameters
The Report Builder supports variable data through query fields, input parameters, and calculated
fields, as follows:
Query field Maps to columns in the database result set associated with the report. You define
one query field for each column in the associated database query.
Calculated field Analyzes or sums multiple detail rows in a report. ColdFusion dynamically
generates calculated field values at report-generation time, optionally recalculating the value with
each new report, page, column, or group.
Input parameter Specifies data fields that you pass to the report at runtime through the
cfreportparam tag or from a main report to a subreport. You can place input parameters directly
on a report band or you can use them as input to a calculated field.
To define a query field:
1.
Click the Fields and Parameters tab. By default, this tab is in the lower-right area of the Report
Builder window.
2.
Click Query Fields.
3.
Click the plus sign (+) at the top of the tab.
The Add Query Field dialog box appears.
4.
Type a value for the name field. This must match a column name in the corresponding cfquery
statement and cannot contain a period.
5.
Type a default label.
6.
Specify the data type of the corresponding database column, as follows:
7.
Click OK.
Note: The Query Builder defines query fields automatically for all database columns in the result set
(does not apply to the Advanced Query Builder). Additionally, if you run the Query Builder as part of
the Report Creation Wizard, the wizard places query fields on the report.
To define a calculated field:
1.
Click the Fields and Parameters tab. By default, this tab is in the lower-right area of the Report
Builder window.
2.
Click Calculated Fields.
3.
Click the plus sign (+) at the upper edge of the tab.
The Add Calculated Field dialog box appears.
Object Time Long
Boolean Double Short
Byte Float Big Decimal
Date Integer Image
Time Stamp BLOB String