Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1034

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
2
Create a CFM page and add a
populate a query and pass it using the
attribute, the passed query overrides the internal query.
<cfquery name="northwindemployees" datasource="localnorthwind">
SELECT EmployeeID, LastName, FirstName, Title, City, Region, Country
FROM Employees
ORDER BY Country, City
</cfquery>
<CFREPORT format="PDF" template="EmpReport.cfr"
query="#northwindemployees#"/>
Note: ColdFusion does not render text that occurs before or after the
Open a browser and display the CFM page.
3
ColdFusion generates the report.
If you display an HTML report, ColdFusion generates temporary files for images in the report. You can specify how
long the temporary files are saved on the server by using the
more information, see the CFML Reference.
Display a CFR file in a browser
Create a report that uses an internal query and does not use input parameters.
1
2
Open a browser and display the CFR file.
Save a report to a file
Create a report, with or without an internal query.
1
2
Create a CFM page and add a
the previous procedure. Include a
as the following example shows:
<CFREPORT format="PDF" template="emppicture.cfr"
filename="#GetDirectoryFromPath(GetTemplatePath())#/emppicture.pdf"
overwrite="yes"/>
If you write the report output to an HTML file, ColdFusion creates a directory located relative to the HTML file,
generates files for the images (including charts) in the report, and stores the image files in the directory. For more
information, see
"Exporting the report in
Use the .pdf extension for PDF output format, the .swf extension for FlashPaper output format, .xml extension for
an XML file, .rtf extension for an RTF file, .html extension for HTML files, and the .xls extension for Excel format.
Open a browser and display the CFM page. ColdFusion generates the report, saves the file, and displays an empty
3
page in the browser.
Disable browser display of the CFR file
1
Open the Report Properties dialog box by selecting Report > Report Properties from the menu bar.
Clear the Allow Direct .CFR Browser Invocation option, and click OK.
2
Using input parameters to pass variables and other data at run time
Input parameters are data fields that you pass to the report at run time. You can place input parameters directly on a
report band or you can use them as input to a calculated field.
tag that runs the report. If the report does not use an internal query, also
cfreport
attribute. If the report uses an internal query and you use the
query
tag that runs the report. Optionally pass a
cfreport
attribute that specifies the fully qualified name of the file being created,
filename
HTML" on page 1047.
Last updated 1/20/2012
tag.
cfreport
attribute of the cfreport tag. For
resourceTimespan
query
1029
query
attribute, as described in

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents