Skip to main content
Inspiring
June 22, 2009
Question

Dynamically passing text and url-based images as an input parameter to cf8 report builder

  • June 22, 2009
  • 1 reply
  • 2014 views

I'm unsuccessfully trying to dynamically pass text and url-based images to a group footer or the detail section via an input parameter or even hardcoded. The field has the attribute 'XHTML Text Formating' set to True. The following are failed samples of a simplified value:

"<img height=’300’ alt=’Document’ width=’300’ src=’http://www.google.com/intl/en_ALL/images/logo.gif’ />"

or

"<img src=’http://www.google.com/intl/en_ALL/images/logo.gif’ />"

This just results in the above text being output. The end result would have various text and images from a database as input by a user, thus the reason I cannot just use the hyperlink information attribute as I could if it were a single known image. I tried rtf and pdf report types. Ideas?

This topic has been closed for replies.

1 reply

Participant
June 23, 2009

I have done something similar by defining the space I want an image to occupy and setting the image (location) to an input param value (param.includeimage1).  I set the "print when condition" to "param.includeimage1 is not """ because I actually pass through a maximum of 5 images to this report but there could be no images associated.  I am sure you could do the same based on query fields but the form leading up to the display fo the cfreport allows users to indicate which, if any, of the images they want to display on the report so I need to pass it through rather than just display straight from the query.

HTH

BrianOAuthor
Inspiring
June 23, 2009

HTH,

Thanks. I'll keep that in mind, although I don't know how many images my user might need or what sizes so that might be tricky.

Since my target output is rtf so that MS Word can be used to edit the result, I added a pagebreak to a MS Word doc and used the resulting html source to replace the rich text editor source code for the page break, but that did not help either. The page break was so a user could add an image later. Something is wrong with the Report Builder related to intepreting XHTML, especially anything that has an attribute, including URL-based image links. I hope they try to provide another update before CF9. I doubt my client will be going to CF9 for some time, since they are just completing the migration to CF8.

BrianO