Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass parameter from ColdFusion page to ColdFusion Report

Status
Not open for further replies.
Jul 23, 2010
5
US
Having problem trying to pass parameter from Cold Fusion Page to Cold Fusion Report Builder. Please help.

Following is the code in Cold Fusion page named “CRDF_report.cfm”

<cfreport template="CRDF_Test.cfr" format="PDF">
<cfreportparam name="Judicial_ID" value="LB">
<cfreportparam name="FISCAL_YEAR" value="#variables.fiscal_year#">
<cfreportparam name="RECORD_MONTH" value="#variables.record_Month#">
</cfreport>

Following is the select statement of the SQL Query Builder
in CRDF_Test.cfr

Select Judicial_ID, Fiscal_Year from court_data

The result show fine when I only have the select statement.

But, my goal is to pass the parameter from the ColdFusion page to Cold Fusion report Builder. Therefore, I added a condition to the above query.

select Judicial_ID, Fiscal_Year from court_data
where Judicial_ID = '#Judicial_ID#'

When I either ran “CRDF_report.cfm” or “CRDF_Test.cfr” on the browser, I got the error message that “Judicial_ID” is undefined.

I then tried to add the parameter just to be sure.

After I added the parameter on the right under “Input Parameters”, I moved the “param.Judicial_ID” to the Detail band. I saved the program and ran again. I still got the same error message.

I tried many times and many ways to pass parameters but it just not working. I am really stuck, anyone can tell me what is wrong and show me how to do it correctly would be greatly appreciated.

Thanks,

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top