User Guide

Table Of Contents
Creating reports with the ColdFusion MX 7 reporting 779
Report definition guidelines
To ensure a successful report, you should plan the following before defining it in the ColdFusion
Report Builder:
Report design issues:
Audience Why are you creating this report? Who is the audience?
Data What data needs to be in the report? Where does it come from? Whether you use the
Query Builder or pass a query to the report, you should plan the data in advance.
Grouping Do you need groups? If so, ensure that the result set is returned in the correct
order, and you define a group based on the sort column.
Calculated fields Are there fields that need to be totalled or calculated? For column totals,
use calculated fields. For calculated totals on individual rows, use SQL. For more information,
see “Common reporting tasks and techniques” on page 779.
input parameters Do you need to pass variable data to the report. If so, define an input
parameter and pass values to the report at runtime using the
cfreportparam tag. For more
information, see “Common reporting tasks and techniques” on page 779.
Data retrieval strategy:
Query Builder and basic SQL Use this option when your report has standard selection
criteria (such as a WHERE clause with sorting and a fixed set of selection criteria) and when
you need to develop a report quickly. This method also allows you to specify
cfquery options,
such as caching.
Query Builder and advanced query mode Use this option when you want to use a
ColdFusion query encapsulated in the report definition. This option is also useful if the query
comes from the
cfdirectory, cfldap, or cfpop tags; query of queries, or is dynamically
constructed with the
QueryNew function.
The cfreport tag and a passed query Use this option when you need more control over the
result set used in the report; for example, your application might have a form that your end
users can use to construct dynamic selection criteria.
Related visual information:
Charts For more information, see “Using charts” on page 800.
Subreports For more information, see “Using subreports” on page 800.
Common reporting tasks and techniques
This section describes the following reporting tasks and techniques:
Grouping and group breaks
Defining, modifying, and using fields and input parameters
Using toolbox elements on report bands
Aligning elements
Using text styles
Previewing reports