CFREPORT

CFREPORT runs a predefined Crystal Reports report.

Syntax

<CFREPORT REPORT="report_path"
    ORDERBY="result_order"
    USERNAME="username"
    PASSWORD="password"
    FORMULA="formula">
 
</CFREPORT>

REPORT

Required. Specifies the path of the report. Store your Crystal Reports files in the same directories that you store your ColdFusion page files.

ORDERBY

Optional. Orders results according to your specifications.

USERNAME

Optional. The username required for entry into the database from which the report is created. Overrides the default settings for the data source in the ColdFusion Administrator.

PASSWORD

Optional. The password that corresponds to a username required for database access. Overrides the default settings for the data source in the ColdFusion Administrator.

FORMULA

Optional. Specifies one or more named formulas. Terminate each formula specification with a semicolon. Use the following format:

FORMULA="formulaname1='formula1';formulaname2='formula2';"

If you need to use a semi-colon as part of a formula, you must escape it by typing the semi-colon twice (;;), for example:

FORMULA="Name1='Val_1a;;Val_1b';Name2='Val2';"

Example

<!--- This view-only example shows the use of CFREPORT --->
<HTML>
<HEAD>
<TITLE>CFREPORT Example</TITLE>
</HEAD>

<BODY>
<H3>CFREPORT Tag<H3>
<P>CFREPORT allows reports from the Crystal Reports Professional 
report writer to be displayed through a ColdFusion interface.  
The CFREPORT tag requires the name of the report to run; 
CFREPORT can also pass information to the report
file being displayed to change the output conditions.

<P>This example would run a report called 
"monthlysales.rpt " and pass it an optional filter condition to
show only the information for a certain subset of the report.

<CFREPORT REPORT='/reports/monthlysales.rpt'>
          {Departments.Department} = `International'
</CFREPORT>

<P>Substitute your own report files and filters for this code 
and CFREPORT can place your existing Crystal Reports into web pages.

</BODY>
</HTML>