CFREPORTPARAM |
Description Passes input parameters to a ColdFusion Report Builder report definition. Allowed inside cfreport tag bodies only.
Category Data output tags
Syntax
    <cfreportparam
       name = "data name"
       value = "data value">
See also cfreport; Chapter 32, "Creating Reports for Printing," in ColdFusion MX Developer's Guide; Report Builder online Help
History ColdFusion MX 7: Added this tag.
Usage 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.
Example
    <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>

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.