Welcome to Dream.In.Code
Getting Help is Easy!

Join 109,372 Programmers for FREE! Ask your question and get quick answers from experts. There are 971 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



CF Report Builder Iif syntax for images

 
Reply to this topicStart new topic

CF Report Builder Iif syntax for images

coldiron
post 11 Oct, 2007 - 03:59 AM
Post #1


New D.I.C Head

*
Joined: 28 Mar, 2007
Posts: 3


My Contributions


I am using CF 8 with CF Report Builder 7.

I have a working CF Report that displays images dynamically, but throws an error if the field in the database is null (Report data binding error Image not found).

I am trying to write an Iif statement, but cant seem to get it right.

This code works if the field has data

CODE
application.sImageLocation & "/" & query.listingimage1


My goal is to display the image represented in the field, but if the field is null or empty, I want to display an image in the same directory called "placeholder.gif"

This is the Iif statement I have been working with. Can you help me with what I am missing?

CODE
application.sImageLocation & "/" & Iif([query.listingimage1] IS "Null", "/fsboplaceholder.gif", query.listingimage1)

User is offlineProfile CardPM

Go to the top of the page


dswens
post 23 Oct, 2007 - 06:08 PM
Post #2


New D.I.C Head

*
Joined: 16 Oct, 2007
Posts: 34


My Contributions


If it pleases the court, you could simply make the default value for your database field "placeholder.gif" and then use an update query to replace it with other images as necessary.
User is offlineProfile CardPM

Go to the top of the page

coldiron
post 25 Oct, 2007 - 09:26 AM
Post #3


New D.I.C Head

*
Joined: 28 Mar, 2007
Posts: 3


My Contributions


QUOTE(dswens @ 23 Oct, 2007 - 06:08 PM) *

If it pleases the court, you could simply make the default value for your database field "placeholder.gif" and then use an update query to replace it with other images as necessary.


Thanks for the input.

I tried that. My problem is that the data entry field is part of a "Cfupload", so you cannot have any default values in this coldfusion control on the web ap. Even if it is a default value in the database. It is part of the security measures in CF.

I have been able to work around it in my .cfm files by using a "cfif". What I am looking for is how to write the same "if" statement in Coldfuion Report Builder
User is offlineProfile CardPM

Go to the top of the page

dswens
post 25 Oct, 2007 - 05:54 PM
Post #4


New D.I.C Head

*
Joined: 16 Oct, 2007
Posts: 34


My Contributions


Sorry I couldn't be of more help. I haven't used the Report Builder yet so that's beyond my scope.
Hope you find the solution soon... I know how it is to be stuck on some little detail like that. Good Luck!
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 9/6/08 11:34PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month