Link to home
Start Free TrialLog in
Avatar of mossmis
mossmis

asked on

SSRS Substituting Embedded image when database image not found

I have a report that is running great. I'm using the Zen barcode tool to generate barcodes.

http://barcoderender.codeplex.com/wikipage?title=SSRS%202008%20Integration

The report prints 24 barcodes on a page to reference numbers above them. The report will only ever return no more than 24 numbers. But the report can return as little as one record. Because of this, I need to define 24 images with database references. When no data is returned, a tiny box with a red "X" shows. Instead of that, I'd rather have a substitute embedded image.

I embed the image and use an if statement to try to substitute, but no dice. Still the red "X". I'm guessing because it can be from two different data sources?

Any suggestions?
Avatar of Nico Bontenbal
Nico Bontenbal
Flag of Netherlands image

I haven't tried this but maybe you can place the barcode inside a rectangle (same size as barcode) and use a background image for the rectangle. When there is no barcode to display hide the barcode image and the rectangle background image will show up (hopefully).
Avatar of mossmis
mossmis

ASKER

I actually have this in a table with 24 cells. The barcode is generated into an image. So every cell has an image control. The image is set to retrieve data from a database value. I won't be able to use the background image on this one.
ASKER CERTIFIED SOLUTION
Avatar of Nico Bontenbal
Nico Bontenbal
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mossmis

ASKER

It's a nasty work around (tons of formatting and making things hidden and visible through many if statements), but it gets the job done. I was hoping to use built-in SSRS functions for substituting image as I have i the past in simple reports, but this will do for now.