Input parameters are data fields that you pass to the report at runtime. You can place input parameters directly on a report band or you can use them as input to a calculated field.
Define input parameters in the same manner as query fields. You can specify a default value that ColdFusion uses when there is no corresponding parameter. For more information on defining input parameters, see Defining, modifying, and using fields and input parameters.
You use input parameters in the following ways:
cfreportparam
tags embedded in the cfreport invocation. For example, if you define an input parameter named ReportTime, you pass a cfreportparam
tag with a name attribute set to ReportTime, as the following example shows:
<cfreport format="PDF" template="FourthReport.cfr" query="#coursedept#"> <cfreportparam name="ReportTime" value="#DateFormat(Now())#, #TimeFormat(Now())#"> </cfreport>
For information on dynamically populating input parameters at runtime, see Advanced query mode.