Solved

SSRS Substituting Embedded image when database image not found

Posted on 2014-09-23
4
169 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

After much searching across the internet I have found that you could not set the name of the file you were attaching to dynamic report subscriptons in Microsoft Reporting Services. I did manage to find one article showing you how your could make a s…
Time Corrections for Reports Working with a report, we made some interesting discoveries about the time corrections/updates We are using the following Parameters: Starting Entered Date (Date) formatted as Data type: "Date/Time" Ending Entered …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now