Using the cfreport Tag


Using the <cfreport> Tag

This tag is new in ColdFusion MX. The <cfreport> tag runs predefined Crystal Reports created in a Windows application. It applies only to Windows-based systems and uses cfcrystal.exe to generate reports. This tag sets the parameters in the Crystal Reports engine according to the values of its attributes. Since Crystal Reports establishes an independent connection to the data source, it isn't subject to any ColdFusion data source-specific restrictions. For example, the Crystal Reports server can access a data source regardless of whether it's disabled in ColdFusion Administrator or not.

The <cfreport> tag has the following attributes:

  • Type. Takes three values: Standard, Netscape, and Microsoft. Standard isn't valid for Crystal Report 8.0.

  • Datasource. Takes the name of the native or registered data source.

  • Timeout. Specifies the maximum time in which a connection can be made to a Crystal Report.

  • Report. Takes the report path and is a required attribute.

  • Orderby. Orders the results as per your specifications.

  • Username. Takes the username to connect to the database.

  • Password. Corresponds to the username required for database access. It overrides the default settings for data source in ColdFusion Administrator.

  • Formula. Takes the names formulas. It can have a list of formulas delimited by semicolons. If a semicolon appears in a formula, use the formula twice to get the correct result.

The syntax for <cfreport> is

 <CFREPORT          REPORT = "path of the report to show"          TYPE = "report type"          DATASOURCE = "datasource name to use"          TIMEOUT = "no of seconds"          ORDERBY = "sort criteria"          USERNAME = "user name"          PASSWORD = "corresponding password"          FORMULA = "expression"> </CFREPORT> 

You can use Crystal Reports to create an error report and invoke it within a ColdFusion application. This gives you an enhanced and integrated programming facility.




Macromedia ColdFusion MX. Professional Projects
ColdFusion MX Professional Projects
ISBN: 1592000126
EAN: 2147483647
Year: 2002
Pages: 200

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net