User Guide

Table Of Contents
764 Chapter 32: Creating Reports for Printing
cfreport Invokes the specified report definition to create printable output and return it to
the browser or save it in a file. ColdFusion MX supports report definitions from the following
tools:
ColdFusion Report Builder The ColdFusion Report Builder is a banded report writer
that is integrated with ColdFusion MX. For more information, see “Creating reports with
the ColdFusion MX 7 reporting” on page 770.
Crystal Reports Crystal Reports is a report writer whose report definitions you can use
with the
cfreport tag. For more information, see “Creating reports with Crystal Reports
(Windows only)” on page 805.
ColdFusion MX printable reports are available in the following formats:
FlashPaper ColdFusion MX creates a SWF file. Clients must have an up-to-date version of the
Macromedia Flash Player installed.
Adobe Acrobat ColdFusion MX creates a PDF file. Clients must have the Acrobat Reader
installed.
Microsoft Excel (ColdFusion MX 7 reporting only) ColdFusion MX 7 creates an Excel
spreadsheet.
Note: The Excel report output format type provides limited support for the formatting options
available in ColdFusion MX 7 reporting. Images and charts are not supported and numeric data
containing formatting (commas, percents, currency, etc.) appears as plain text in Excel. The Excel
output format supports simple reports only and it is recommended that careful design and layout
consideration be given to reports designed for Excel output.
Crystal Reports (Windows only)
ColdFusion MX passes control to Crystal Reports, which
creates HTML. This option is available with the
cfreport tag only.
Creating PDF and FlashPaper output with the cfdocument tag
The cfdocument tag converts everything between its start and end tags into PDF or FlashPaper
output format and returns it to the browser or saves it to a file. This lets you easily convert
HTML to printable output, as the following example shows:
<cfdocument format="FlashPaper">
<p>This is a document rendered by the
cfdocument tag.</p>
</cfdocument>
The cfdocument tag supports all HTML and CFML tags, with the following exceptions:
cfchart
Macromedia Flash content
Interactive tags, such as form, cfform, and cfapplet
JavaScript that dynamically modifies elements or element positions
Additionally, the HTML wrapped by the
cfdocument tag must be well-formed, with end tags for
every start tag and proper nesting of block-level elements.
Note: ColdFusion MX does not return HTML and CFML outside of the <cfdocument> </cfdocument>
pair.