Adobe COLDFUSION 9 Manual page 1025

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
Define a group
Select Report > Group Management from the menu bar.
1
Click Add.
2
3
Specify a group name in the Name field.
Specify the value that controls grouping (also called a group expression) in the Group on field. At run time,
4
ColdFusion triggers a group break when the result of this value changes. These values are often query field names.
However, this value can also be a calculated field or other type of expression. Sample group expressions include the
following:
Creates a group break when the associated column in the result set contains a different value. The field
Query field
that you specify must be one of the sort criteria for the result set; for example, query.country.
Creates a group break when a calculated field returns a different value. For example, if the
Calculated field
expression calc.FirstLetter returns the first letter of a query column, you can group a report in alphabetical order.
Creates a group break when a Boolean expression returns a different value. For example, if
Boolean expression
your result set is sorted by the passpercentage column, you could use the Boolean expression query.passpercentage
LT 50.
Specify group break options:
5
Forces a new column on a group break.
Start New Column
Forces a new page on a group break.
Start New Page
Resets the page number to 1 on a group break.
Reset Page Number
Specify band size and printing information:
6
The minimum height that must remain on a page for ColdFusion to print the group band on
Min. height for group
that page.
Reprint Header on Each Page
Click OK.
7
The Report Builder adds the group to the report and creates header and footer bands for the group.
8
Click OK again.
9
Add headings, text, query fields, calculated fields, and other information to the group's header and footer.
Create group subtotals
Create a calculated field to contain the group subtotal. Create the calculated field that uses the following criteria:
1
• Specify a numeric data type.
• Select Sum in the Calculation field.
• Specify the field to sum on in the Perform Calculation On field. For example, a report on employees by
department could sum on query.emp_salary.
• Specify to reset the field when the group changes.
2
Place the calculated field on the report.
For more information on calculated fields, see the Report Builder online Help.
Displays the group header on each page.
Last updated 8/5/2010
1020

Advertisement

Table of Contents
loading

Table of Contents