Passes input parameters to a ColdFusion Report Builder report definition. Allowed inside cfreport
tag bodies only.
<cfreportparam
name = "data name"
value = "data value">
cfreport; Creating Reports for Printing in ColdFusion MX Developer's Guide; Report Builder online Help
ColdFusion MX 7: Added this tag.
Attribute | Req/Opt | Default | Description |
---|---|---|---|
name |
Required |
|
Variable name for data that is passed. The ColdFusion Report Builder report definition must include an input parameter that matches this name. |
value |
Required |
|
Value of the data that is sent. |
Specifies an input parameter to a ColdFusion Report Builder report definition. The ColdFusion Report Builder report definition must include an input parameter that matches the name
attribute.
You can use cfreportparam
to pass data to a report definition, as an alternative to the cfreport query
attribute.
<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>