Adobe COLDFUSION 9 Manual page 1047

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
Change the report output format
Choose Report > Report Properties from the menu bar.
1
From the Default Output Format pop-up menu, choose RTF. Use this format for faster display in a web browser.
2
3
Click OK to close the Report Properties dialog box and return to the report.
Choose File > Save to save your changes.
4
Press F12 to preview the report. The images are displayed beneath Artist name and to the left of the art title.
5
6
Change the Default Output Format to HTML and preview the results.
Adding charts
You can use the Chart Builder to add two pie charts to your report: the first pie chart shows the total dollar amount of
the art sold versus the total dollar amount unsold art for each artist; the second pie chart shows the sum of artwork
sold versus unsold for all of the artists.
The two pie charts are the same except for the scope. To apply a pie chart to a group (the ratio of sold to unsold art for
each artist), add the pie chart to the group footer band. To apply the pie chart to the report (the ratio of sold to unsold
art for all artists), add the pie chart to the report footer band.
In
"Adding a calculated
field" on page 1039, you added a calculated field for the total dollar amount of artwork sold.
Before you can create the pie chart for this example, create a second calculated field for the total dollar amount of
unsold art.
Add a calculated field for the sum of unsold art
Choose Window > Fields and Parameters.
1
Select the Calculated Fields heading in the Fields and Parameters panel.
2
3
Click the (+) icon at the upper edge of the panel:
In the Name field, type Unsold.
a
In the Default Label Text field, type Unsold.
b
c
In the Data Type field, choose Big Decimal from the pop-up menu.
In the Calculation field, choose Sum from the pop-up menu.
d
In the Perform Calculation On field, enter the following expression to calculate the dollar amount of unsold art:
e
Iif(IsBoolean(query.ISSOLD) and not(query.ISSOLD), query.Price,0)
In the Reset Field When field, choose Group from the pop-up menu.
f
In the Reset Group field, choose LASTNAME.
g
h
Click OK to close the Add Calculated Field dialog box and return to the report.
4
Choose File > Save from the menu bar to save your changes to the report.
Add a pie chart to the group footer
Expand the LASTNAME Footer band.
1
2
Choose Insert > Chart from the Report Builder menu bar:
Choose Pie from the Base Chart Type list. The Chart Sub-Type appears to the right of the Base Chart Type.
a
Choose the 3D chart.
b
Last updated 8/5/2010
1042

Advertisement

Table of Contents
loading

Table of Contents