Whatever message this page gives is out now! Go check it out!
<cfreport template = ...>
<cfreportparam
chart = "name of the chart contained in the report or subreport"
name = "data name"
query = "query value passed to the chart or subreport"
series = "ordinal number of a chart series"
style = "CSS style definition or CSS file pathname"
subreport = "name of the subreport"
value = "data value">
</cfreport>Attribute | Req/Opt | Default | Description |
chart | Optional | Name of the chart contained in a report or subreport. The value of this attribute must match Name property of a chart defined in the Report Builder report. If you specify the chart attribute, you cannot specify the subreport or name attribute. | |
name | Optional | Variable name for data that is passed. The value of this attribute must match the name of an input parameter defined in the Report Builder report. If you specify the name attribute, you cannot specify the chart or subreport attribute. | |
query | Optional | Query value to pass to a subreport or chart. The ColdFusion query must contain at least all of the columns included in the Report Builder query. Charts and subreports require this attribute. | |
series | Optional | 1 | Ordinal number of a chart series to use for the query. This attribute is valid only when the chart attribute is specified. |
subreport | Optional | Name of the subreport. The value of this attribute must match the Name property of the subreport in Report Builder. Subreport names within a report must be unique. If you specify the subreport attribute, you cannot specify the chart or name attribute. | |
style | Optional | Style in CSS format for a subreport. The value can be an absolute file path, a file path relative to the report, or a string in valid CSS format. For the styles to take effect, the style names must match Style Name attributes assigned to elements in the Report Builder report. You can generate the CSS file in Report Builder and exported or created with a text editor. For a list of supported CSS styles, see the section Style properties. | |
value | Optional (see Description) | Value of the data that is sent. Specify the value attribute with the name attribute. You cannot specify this attribute when a chart or subreport attribute is specified. The value can be a string or a variable. |
<cfreport template="myreport.cfr" query="master" format="RTF">
<cfreportParam subreport="subreport1" query="subquery1">
<cfreportParam subreport="subreport2" query="subquery2">
<cfreportParam chart="chart1" series="1" query="chartquery1">
<cfreportParam chart="chart1" series="2" query="chartquery2">
<cfreportParam name="ReportDate" value="#DateFormat(Now())#, #TimeFormat(Now())#">
</cfreport><cfreport template="myreport.cfr" style="myStyle.css" format="PDF">
<cfreportParam subreport="subreport1" style="subreport-style.css">
<cfreportParam subreport="subreport2" style="subreport-style.css">
</cfreport><!--- The following example shows how to override a query in a Report Builder report from the CFM page. The cfreportparam tag adds the current date and time to the report.--->
<cfquery name="coursedept" datasource="cfdocexamples">
SELECT Departments.Dept_ID as dDept_ID, Departments.Dept_Name,
CourseList.Course_ID, CourseList.Dept_ID as cDept_ID,
CourseList.CorNumber, CourseList.CorName,
CourseList.CorLevel
FROM Departments, CourseList
WHERE Departments.Dept_ID = CourseList.Dept_ID
ORDER BY CourseList.Dept_ID
</cfquery>
<cfreport format="PDF" template="FourthReport.cfr" query="#coursedept#" overwrite="yes">
<cfreportparam name="ReportTime" value="#DateFormat(Now())#, #TimeFormat(Now())#">
</cfreport>