Textbox on top of picture - reporting-services

In Reporting Services I'm trying to place a table over a picture. Within the Report Builder it works, but whenever the report is run, the table is moved to beneath the picture. I've thought about several workarounds, but none of them has worked:
Creating a rectangle with my picture as the background, and placing the table of top of the rectangle. This works, but it doesn't show the picture in the Excel sheet when exporting the report. I need the picture in the report, so this solution is not satisfactory.
Creating a report where the background image is set to the picture I need, and then importing it in my main report as a subreport. The weird thing here is that background images WILL show up in Excel when you just export the report with the background image. However, when importing that report within another report, it doesn't show up anymore in the export.
Set the picture as background for the main report. the problem is that the picture will be the background for every page/sheet. If someone nows a possibility to set a specific background per page, I would also be helped!
TL;DR: Is it possible the overlay a table of top of a picture? Or is it possible to set a background image per page, so I can use that instead?

You can overlap text and an image but it may not show up that way depending on how you want to render it. I think it works with PDFs and DOCs but not much else.
You can use a background image for the report or just the table's background.
Click on either the Body or the table and use the Background Image properties.
Put an Expression in the Background Image Value field with your logic to determine which image to display.
https://technet.microsoft.com/en-us/library/ms156482(v=sql.100).aspx

Related

Custom Code for Color Gradation in SSRS header

I'm trying to make SSRS custom report header. Refereed this link:
http://sqljason.com/2013/02/custom-code-for-color-gradation-in-ssrs.html
How can I put below color as my report header. Note: I would like to display the text, date and sum of count dynamically as well.
Specially looking for color attached below as my header color:
Do I need to write some custom code for header? How can I achieve this?
You could just create an image with the gradient in using one of many free image editors around. Then use that image in a rectangle in your header. You can then add the data as textboxes in the rectangle.
Be warned some rendered do not like overlapping objects so do a quick test and check in each of the desired output formats before you spend too much time on the report.

Background image repeats despite setting to "Clip"

I am trying to show a "check" or "X" image inside a tablix cell based on a Condition. I have added both Images to the image Folder and am setting the BackGroundImage Value property to this expression...
=IIF(Fields!PASS.Value = 1,"CheckMark","XMark")
I've also set Background Repeat to Clip. Inside Preview view it looks fine, but when pushing the rdl to the server and running the report locally, the image continues to repeat to fill the textbox.
I am running IE8 and SSRS 2008. Is there a better approach in doing this without setting Background Image property, realistically I'd like to just set the TextBox value property.
I found that I was only getting the repeating Background image 'feature' despite having BackgroundRepeat set to 'Clip' when using an image encoded in a database field or where the name of the embeded image was coming from the database i.e. where Value was set to an Expression.
What I found worked was to set BackgroundRepeat to the Expression ="Clip".
Note that I'm working in 2013/2014 RDL/RDLC but it seems to be the same issue.
One alternative would be to use the show/hide parameter in the text box to control which of the images gets hidden. I'm not sure if this would solve your not repeating option, but it is something you can try. You would set both images to show in each box and write a conditional formula (the inverse of your formula above, pretty much) to hide an image based on value. I'm not sure if that would mess up the alignment for you though, unless you can place the two images on top of eachother since only 1 should show anyway.
It seems that you are not alone with this issue, as there are several other posts about it going back as far as 2010 when I google it. The last status I saw was that it was submitted as a bug to Microsoft, and it seems all of the users had to find workarounds.
I was having the same problem. I found by setting the MIMEtype and setting BackgroundRepeat to Clip fixed the issue.

SSRS 2012, data overlat issue on top of image

I am trying to display data on top of image and can't use watermark/background image for the scenario. In crystal we can use data on top of image and set the property for image gobackward and for data fields cometofront, so that it will display the image and data together. But in SSRS the data is displaying below the image. Please help me to display the data on top of image, and I have multiple images to the displayed in a single report with data.
Right click on the cell that you want an image in. Then Click properties. Then click fill. Then change image source to 'embedded'. Then import your image.

SSRS Display Either Embedded or Database Image

I want to show an image on my report if that image exists in the database for the person record displaying on the report. However, if that person record does not have an image, I want to display an embedded image in the exact location where the database image would be. When I put them on top of each other and toggle the visibility based on an expression, SSRS seems to be "holding" the space for the image which is hidden. For example, if the embedded image is on top of the database image on the report and the embedded image is set to hidden SSRS will show a blank space to the right of the visible image.
I have tried to put the images in a table and toggle the columns without luck and played around with the image settings (AutoFit, Clip, etc). It does not look like we can use an expression because they are of different types (embedded vs. database). Is there any way to do this beyond putting the embedded image in the database?
The way we got this to work is to create a Tablix and then toggle the column visibility. It is interesting that the Tablix works differently than a Table, but it does.
We found this which discusses the issue:
http://sqlserverpedia.com/blog/sql-server-bloggers/dealing-with-white-space-due-to-a-hidden-textbox-in-reporting-services/
Put a rectangle object in the cell of the table so that you can have free form placement of the image item. Add a default embedded image into your rdl, call it defaultImage. Since the data type from the database will be a byte[], in order for you to check if the database field value is null, your visibility expression on the default embedded image will be:
=Not(IsNothing(Fields!{FieldName}.Value))
Now that your default image will hide when there is a field value from the database. Place a new image object on top of the default image, same size. This image will use the database field value directly, no suppression needed. When the byte[] is empty the database image will not show, and the embedded (default image) will show.

RS2008 Background Image Sizing

So I'm attempting to create a report that is able to pre-fill a "government form" with Reporting Services 2008.
Now this all falls down to the 96 DPI issue everyone seems to be having.
Let's say I have a 300 DPI high res JPG file that I want to use as a background image for a report. (This jpg is actually a scan of the government form I'm trying to prefill)
When you set the Fill option of a rectangle object (or even the entire report body) - you have no option but for it to be it's original size. I cannot seem to get the image to fit proportional to the size of my rectangle.
If I add the image as a ... "image object" - I get my desired right shock horror - because I can select the sizing option "fit proportional" and then resize my "image object" as I desire.
BUT - you cannot overlay textboxes over the top of an image object. And because my image object contains fields I'm trying to prefill from a dataset - it fails.
Any ideas?
Ok so I managed to figure this out.
For those interested, read this guide and DOWNLOAD THE SAMPLE PROJECT for an example (ignore the stuff regarding showing/hiding high/low res versions - I merely used the example to see how they were able to overlay textboxes ontop of images).
http://www.infoq.com/articles/Gogolowicz-Swanson-SSRS
You need to keep an eye on an objects parent. Keep in mind these notes;
Page_1 rectangle needs to have a parent of BaseRectangle.
Page_1_Image needs to have a parent of BaseRectangle.
All page1 textboxes need to have a parent of the Page_1 rectangle etc.
It all makes sense now.