Solved

SSRS Substituting Embedded image when database image not found

Posted on 2014-09-23
4
178 Views
Last Modified: 2014-10-23
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?
0
Comment
Question by:mossmis
  • 2
  • 2
4 Comments
 
LVL 22

Expert Comment

by:Nico Bontenbal
ID: 40341791
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).
0
 

Author Comment

by:mossmis
ID: 40342492
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.
0
 
LVL 22

Accepted Solution

by:
Nico Bontenbal earned 500 total points
ID: 40342550
So you have 24 cells in a table in the design I suppose? You can put a Rectangle in each cell of this table. Then place the image control inside the Rectangle. Use the backgroundImage propery of the Rectangle (not the report)
0
 

Author Closing Comment

by:mossmis
ID: 40399459
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.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This code started out as a fix for a customer that had incoming data that was hunderds of numbers and words long that was to fit in one column. The problem was that the customer did not want to split words or numbers when wrapping in the column. …
Hi All, I am here to write a simple article to move SSRS (SQL Server Reporting Services) reports from one server to another. When I have faced the same issue to move reports those were developed by developer on development server and now need to …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question