Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 598
  • Last Modified:

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.


  • 2
2 Solutions
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.


You should be able to put in images, this works for me.

<cfdocument format="pdf">
<img src="http://livedocs.macromedia.com/images/mm.gif" />

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.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now