To ensure a successful report, you should plan the following before defining it in the ColdFusion Report Builder:
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.
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.
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.
Charts For more information, see Using charts.
Subreports For more information, see Using subreports.