When running on Windows, the cfreport tag also supports the execution of reports created using Crystal Reports version 9 or 10.
Note: When you install Crystal Reports, you must select the Enable export to HTML and Enable export to Disk options. These options are not enabled by default, so you must use the Custom Install option.
- Create a report definition in Crystal Reports.
- Create a CFM page and add a cfreport tag that invokes the Crystal Reports report definition. The following example shows the cfreport tag invoking a Crystal Reports report definition and passing a filter condition:
<cfreport report = '/reports/monthlysales.rpt'>
{Departments.Department} = 'International'
</cfreport>
- Open a browser and display the CFM page.
ColdFusion uses COM to call Craxdrt9.dll for Crystal Reports version 9, and Craxdrt.dll for Crystal Reports version 10. If you have problems with the
cfreport tag, ensure that these DLLs are registered and, if not, use regsvr32 to register them (the default location for these DLLs is C:\Program Files\Crystal Decisions\Report Designer Component\).
For complete information on defining reports in Crystal Reports, see the Crystal Reports documentation.