Adobe COLDFUSION 9 Manual page 1043

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
Edit the heading label text
Double-click the LASTNAME field in the Column Header band.
1
Replace the column name with Artist Name, and click OK.
2
3
Replace the remaining column labels as follows:
• ARTNAME > Title
• DESCRIPTION > Description
• PRICE > Price
• ISSOLD > Sold?
Using expressions to format data
Use the Expression Builder to perform the following tasks:
• Change the display of the ISSOLD value to a yes/no expression. By default, Report Builder displays 0 (not sold) or
1 (sold) for the ISSOLD column based on how the data is stored in the database. You can use a function to change
the display to yes or no.
• Change the value of the PRICE column to a dollar format.
• Concatenate the artists' first and last names. Even though the FirstName field is a nonprinted field in the report,
you can add it to an expression because it is part of the SQL query that you created.
Change a Boolean value to yes/no
1
Double-click the query.ISSOLD element in the detail band. Report Builder displays the Expression Builder for that
element.
2
In the Expression Builder, expand the Functions folder.
Choose Display and Formatting from the Functions list. Report Builder displays the list of functions in the right
3
pane of the Expression Builder.
Double-click YesNoFormat from the list of functions. Report Builder automatically completes the following
4
expression in the expression pane:
YesNoFormat(query.ISSOLD)
5
Click OK to close the Expression Builder and return to the report.
Choose File > Save to save your changes to the report.
6
Press F12 to preview the report. Yes or no appears in the Sold? column based on whether the artwork sold.
7
Display numbers in dollar format
Double-click the field in the PRICE column of the detail band.
1
In the expression pane, change the expression to the following text:
2
DollarFormat(query.PRICE)
Click OK to close the Expression Builder and return to the report.
3
Concatenate the FIRSTNAME and LASTNAME fields
Double-click the query.LASTNAME field in the LASTNAME group header.
1
2
In the Expression Builder, type the following expression:
query.FIRSTNAME &" "& query.LASTNAME
Last updated 8/5/2010
1038

Advertisement

Table of Contents
loading

Table of Contents