0

I have tried the below code for creating report in ColdFusion, but it gives failure like in the screenshot,

 <cfchart format="png" name="chartImage">
    <cfchartseries type="bar" query="chart" itemcolumn="title" valuecolumn="level">
 </cfchart>

 <cfset chartImageFile = getTempDirectory() & '\' & createUUID()>
 <cfset fileWrite(chartImageFile, chartImage)>

 <cfreport format="pdf" template="report.cfr" name="grid">
    <cfreportparam name="reportTitle" value="#reportType.title#">
    <cfreportparam name="chartImage" value="#chartImageFile#">
 </cfreport>

<cfset fileDelete(chartImageFile)>

enter image description here

Justin
  • 378
  • 1
  • 3
  • 12
  • Have you tried giving your image file name `chartImageFile` a proper extension? Change this `` to this ``. – Miguel-F Oct 23 '20 at 16:22
  • 1
    Might want to check the other answer on this question too - https://stackoverflow.com/a/64466965/1636917. looks like you copied that code verbatim so maybe it will work for you too. – Miguel-F Oct 23 '20 at 16:29
  • What is the value of `ReportType.title`? – Dan Bracuk Oct 23 '20 at 18:24

0 Answers0