Highlighted

Report Type for pdf and Excel

Engaged ,
Aug 26, 2014

Copy link to clipboard

Copied

I have following code to generate the report for pdf format.

I would like to let users to choose report type 'pdf' or 'excel'

I need pass the user select from user interface to <cfreport format= "PDF" or "Excel".

Can you please advise how I can pass the user select Report Type from lsReportType to my cfReport?

Your help and information is great appreciated,

Regards,

Iccsi

<cfstoredproc procedure="spGetReportType">

   <cfprocresult name="rsReportType" resultset="1">

</cfstoredproc>

<cfreport format = "PDF" template= "MyReport.cfr" query="#myQuery#">

   </cfreport>

<td><select width="50" name="lstReportType" id="lstReportType">

      <cfoutput query="rsReportType">

         <option value="#rsReportType.ReportTypeID#" <cfif (isDefined("form.ReportTypeID") AND form.ReportTypeID EQ rsReportType.ReportTypeID)>selected="selected"</cfif>>#rsReportType.ReportType#</option>

       </cfoutput>

     </select></td>

Change format="PDF" to format="#VariableName#" where VariableName contains the text "PDF" or "Excel".

TOPICS
Reporting

Views

330

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Report Type for pdf and Excel

Engaged ,
Aug 26, 2014

Copy link to clipboard

Copied

I have following code to generate the report for pdf format.

I would like to let users to choose report type 'pdf' or 'excel'

I need pass the user select from user interface to <cfreport format= "PDF" or "Excel".

Can you please advise how I can pass the user select Report Type from lsReportType to my cfReport?

Your help and information is great appreciated,

Regards,

Iccsi

<cfstoredproc procedure="spGetReportType">

   <cfprocresult name="rsReportType" resultset="1">

</cfstoredproc>

<cfreport format = "PDF" template= "MyReport.cfr" query="#myQuery#">

   </cfreport>

<td><select width="50" name="lstReportType" id="lstReportType">

      <cfoutput query="rsReportType">

         <option value="#rsReportType.ReportTypeID#" <cfif (isDefined("form.ReportTypeID") AND form.ReportTypeID EQ rsReportType.ReportTypeID)>selected="selected"</cfif>>#rsReportType.ReportType#</option>

       </cfoutput>

     </select></td>

Change format="PDF" to format="#VariableName#" where VariableName contains the text "PDF" or "Excel".

TOPICS
Reporting

Views

331

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 26, 2014 0
Advocate ,
Sep 02, 2014

Copy link to clipboard

Copied

Change format="PDF" to format="#VariableName#" where VariableName contains the text "PDF" or "Excel".

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 02, 2014 0