cfdocument tag with cfchart in MX 7

I am getting an error message which I create a pdf with cfdocument tag thatcontains a chfchart tag.

Error Occurred While Processing Request  
The document has no pages.  
The error occurred in C:\websites\fbdrb9\cia\StyleMatrix6.cfm: line 465
463 :       <cfif VAVULCat10 EQ "Fixed"><cfchartdata item="#getFixedChartData.VAVUL10#" value="#getFixedChartData.VAVULAmount10#"></cfif>
464 :    </cfchartseries>
465 : </cfchart>
466 : </td></tr>
467 : </table>

 The charts themselves work.  When I try and wrap the entire template with cfdocument to produce a pdf, I get the above error.
Your help is appreciated.


Who is Participating?
mmc98dl1Connect With a Mentor Commented:
Because CF builds the cfchart on the fly and it also builds the doc on the fly you cant put the both of them together.

The only way I believe you could acheive this is to create the chart as a png - save it to disk, and then use the png in the cfdoc.
jcpattersonAuthor Commented:

You have confirmed what I have been thinking.  I tried a basic image file in an html page and it just wouldn't work.  I have gone through the cfdocument tags thoroughly and cannot see how it can happen.  All of the documentation I have been reading says images can be included but there are no examples.  I tried using the image as a background image in the body tag because documentation says you can.  I couldn't get it to work though.

I'm going to keep the question open to see if there are any other replies.  I asked the cfdjlist but noone has touched the subject.  Unless someones tells me different I will make sure you get the points.


mmc98dl1Connect With a Mentor Commented:
You should be able to put in images, this works for me.

<cfdocument format="pdf">
<img src="" />

Put simply, you should be able to wrap almost any html in a cfdocument pdf and it should give you a pretty accurate representation of the page.

The support for css is a bit dodgy, and also on some html markup.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.