Solved

SSRS Substituting Embedded image when database image not found

Posted on 2014-09-23
4
185 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

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. …
Introduction Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

726 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