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.codep lex.com/wi kipage?tit le=SSRS%20 2008%20Int egration
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?
http://barcoderender.codep
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?
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).
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.