cfreport

Description

Runs a predefined Crystal Reports report.

Category

Extensibility tags

Syntax


<cfreport report = "report_path"

  orderBy = "result_order"

  username = "username"

  password = "password"

  formula = "formula">

 

</cfreport> 

See also

cfcollection, cfexecute, cfgraph, cfindex, cfobject, cfsearch, cfservlet, cfwddx

Attributes

Attribute
Description
report
Required. Specifies the report path. Store Crystal Reports files in the same directories as 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 must use a semicolon 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>    




Banner.Novgorod.Ru