User Guide

Table Of Contents
778 Chapter 32: Creating Reports for Printing
Basic steps for creating reports
The Report Builder is a very flexible tool that provides a variety of ways you can define a report.
However, all reports use the following basic steps:
1.
Begin a new report by selecting File > New from the menu bar, clicking the New toolbar icon,
or pressing Control+N.
The ColdFusion Report Builder Gallery dialog box appears.
2.
Select the As a Blank Report option or the Using the Report Wizard option.
Whether or not you use the Report Creation Wizard, continue with the following steps.
3.
Define the data to be retrieved, either using the Query Builder or by defining the cfquery tag
whose query is passed to the report through the
cfreport tag. Its best to plan your data access
before defining the report, as described in “Report definition guidelines” on page 779.
Tip: You can use the Query Builder through the Report Creation Wizard or from the main Report
Builder interface (select Report > Report Query from the menu bar).
4.
Define query fields. In addition to the Query Builder, you can also define query fields using the
Import or Add Fields buttons on the Report Creation Wizard Define Query Fields panel or the
Query Fields node on the Fields and Parameters tab.
Tip: Use the Import button to import query field definitions from an existing report.
5.
Place query fields on the report. The Report Creation Wizard places query fields on the report
bands automatically. To manually place query fields on a report, drag them from the Query
Fields node on the Fields and Parameters tab to a report band. For more information, see
“Common reporting tasks and techniques” on page 779.
6.
(Optional) Define input parameters. To define input parameters, use the Input Parameters area
on the Fields and Parameters tab. You pass input parameters to a report through the
cfreportparam tag. For more information on input parameters, see “Using input parameters
to pass variables and other data at runtime” on page 792.
7.
(Optional) Define groups. Use the Report Creation Wizard Define Grouping panel or the
Group Management dialog box (Report > Group Management) to define the query field whose
change causes a group break. For more information on grouping, see “Grouping and group
breaks” on page 780.
8.
(Optional) Define the related CFM page. Whether or not the report has an internal query, you
may want to invoke it through the
cfreport tag in a CFM page. If you define a CFM page, be
sure to specify the URL of the CFM page in the Report Preview URL field of the Report
Properties dialog box (used in report preview).
Tip: The Code Snippet Preview dialog box generates a prototype CFM page (or CFC and calling
CFM page) and lets you save this code to a file (or files).
9.
Preview, modify, repeat. To preview a report, select File > Preview from the menu bar, click the
Preview toolbar icon, or press F12.
For more information on report preview, see “Previewing reports” on page 787.