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.
Related
I am using oracle report 6i. I have a problem with the report design. I would like to change one of the field's height to be as high as another field. The second field does have not a fixed height, it depends on the data. So, I found Format Trigger, I have tried to get the height of the other field and set it to be in the current field, but I couldn't. Does anyone know?
I know it is an old question, but nonetheless ...
As far as I can tell, Format Trigger won't do any good here.
I'd go with creating a new frame that would contain both fields (how? Create it in Paper Layout Editor, paint it white (so that you can see what's going on), then move it "Back" until you see both fields appear "on top" of that frame, which means that they are contained in it). Make the frame variable vertically so that it could grow with field_1.
Another option you could try is to anchor field_2 to field_1.
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
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.
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.
I tried creating a report using a sub report. When I exported it to PDF I have noticed that there are extra blank pages in the PDF.
I made it clear that body width + left margin+ right margin <= report width.
But still it gives the blank page. sub report as individual working great.
Also I am calling the sub report from with in a list in main report.
I tried to set up a page break after list . but it looks like its not working.
I want the next list displayed on a new page.
How do I achieve these.
There is no single property available for this in SSRS. You have to check for couple of settings
In report properties, set "ConsumeContainerWhitespace" to TRUE
In tablix properties, set page braek location to NONE
IF still the issue persists, check alignment/margin of objects like rectangle,tablix etc.
A few things to look for:
Check the "parent" and subreport for any controls that are in your margins (or may grow into the margins). Setting the width doesn't necessarily force the controls to that width.
check for any controls that overlap. I've had strange things happen because of that (especially in SSRS 2005).
checking the "Print Layout" while previewing helps find most issues like this at design time (before exporting to PDF).
For the hard break with your list not sure what is goofy there. I usually use a table with groups and set the page breaks on the appropriate group. Depends on the data though.
HTH
Check top and Bottom margins, for me reducing.1 of bottom margin solved the issue.
In my case (with Report Builder 2017) the solution to get rid of a blank extra-page was to reduce the width of the body.
The body can be selected by clicking on a free space in the report on the same height than the Tablix is located.
You then get the "Body properties" shown in which you can reduce the size.
The size of the body should be less than page width - left margin - right margin.
For me it was a problem with the sub report's width which caused extra blank pages in the exported version. Reducing the width solved the issue.
If still someone having an issue with blank pages in PDF, just increase the width of the main report to a few inches. Keep reducing to an optimum value by checking the report. No need to change anything else.
For me when I increase the width for pagesize report from 21 to 23 cm,
It was not generating extra empty page. Because of few elements total
size of my report's element was greater than 21 and less than 23, that
is why I changed to 23cm and works for me.
In my case I have only one page and I was working with .rdl file.
When exporting to pdf and the report contains a sub report where the sub report is grouped on an item from parent report.
Do not use the list control in the parent report to group sub report. Use the table control.
The list control will cause blank pages while the table control does not