home *** CD-ROM | disk | FTP | other *** search
- <!--- This view-only example shows the use of CFREPORT --->
- <HTML>
- <HEAD>
- <TITLE>CFREPORT Example</TITLE>
- </HEAD>
-
- <BASEFONT FACE="Arial, Helvetica" SIZE=2>
- <BODY bgcolor="#FFFFD5">
-
- <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><i>CFREPORT is used in Windows NT only. It is not available under UNIX.</i></P>
-
- <P>This view-only example can run a report called
- "employees.rpt" and pass it an optional filter condition to
- show only the information for a certain subset of the report. In this report,
- the subset is one or more departments that are listed in the form.</P>
-
- <P><B>Note:</B> In order to run this report, you must take the following steps:
- <ol>
- <li>Install Crystal Reports if you have not already installed it.
- <li>Stop all programs, and stop all ColdFusion services, from the Services panel
- that is within the Control Panel prior to installation.
- <li>Once you have installed Crystal Reports, you can restart the ColdFusion server
- and all other ColdFusion services from the Services Panel.
- <li>Take out the comments around the first <CFIF> block and the last
- </CFIF>end tag.
- </ol>
-
- <P>Substitute your own report files and filters for this code and CFREPORT can place
- your existing Crystal Reports into web pages.</P>
-
- <!--- <CFIF IsDefined("FORM.Departments")>
- <CFREPORT REPORT="#GetDirectoryFromPath(CF_TEMPLATE_PATH)#EMPLOYEES.rpt">
- {Employees.Department} IN "#FORM.Departments#"
- </CFREPORT>
-
- <CFELSE> --->
-
- <FORM ACTION="cfreport.cfm" METHOD=POST>
-
- <P>This example demonstrates the integration of Crystal Reports in a ColdFusion
- web application. </P>
-
- <CENTER>
- <TABLE BORDER=1><TD>
- <TABLE><TR>
- <TD WIDTH=200>
- <P><FONT SIZE=-1>
- Select the departments you would like to include in the report.
- Use the CTRL key to select more than one department.
- </FONT></TD>
- <TD><SELECT NAME="Departments" MULTIPLE SIZE=4>
-
- <OPTION VALUE="Sales" SELECTED>Sales
- <OPTION VALUE="Accounting" SELECTED>Accounting
- <OPTION VALUE="Engineering" SELECTED>Engineering
- <OPTION VALUE="Administration" SELECTED>Administration
- </SELECT></TD>
- </TR>
- <TR><TD></TD><TD><INPUT TYPE="submit" VALUE=" Generate Report"></TD>
- </TR>
- </TABLE>
- </TABLE>
- </CENTER>
-
- </FORM>
- <!--- </CFIF> --->
-
- </BODY>
- </HTML>
-