question

NickRyanNZ-4337 avatar image
0 Votes"
NickRyanNZ-4337 asked NickRyanNZ-4337 commented

Text on top of an image doesn't display but does print

I have an SSRS report with an Image. I've added 2 text boxes on top of that image. When I test the report in Visual Studio or deploy to an SSRS portal, the TEXT does not display. If I export to PDF, it does.

I don't think it makes any difference but the image is largely blue and the text is white.

I tried selecting the image and Send to Back or the text boxes and Bring to Front. I added a rectangle placed the text boxes in it and moved that onto the image. One suggestion I found said that the text boxes have to be added after the image so I added a new text box with text in it. Again that doesn't display but does print.

Instead of using an Image control, I made the image the background of the rectangle that contains all the controls in question. The text then displays but the issue is that the graphic I have is not sized appropriately so the lack of ability to scale means I only see part of it. I did try resizing the graphic externally but the software I have is only Paint and that doesn't allow precise enough resizing to fill the front page as cleanly as I'd like.

Some of the things I've tried as described above are ones I found in Stackoverflow but even those answers were qualified that they don't always work and they haven't for me.

So I can make it work by using the graphic as a fill but if someone knows how, I'd prefer to use an image object with text over the top.

sql-server-reporting-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Joyzhao-MSFT avatar image
0 Votes"
Joyzhao-MSFT answered NickRyanNZ-4337 commented

Hi @NickRyanNZ-4337 ,
I inserted an image in the rectangle and added a text box at the top. When I preview, the text and image can be displayed normally.
100053-04.jpg
Here are my steps:

  • In the Report Data pane, right-click the Image node, and then click Add Image.

  • Insert rectangle and select it.

  • In the "Properties" window, expand BackgroundImage, then set the "Source" to "Embed" and the "Value" to the name of the image embedded in the report.

  • Add text box.

In Reporting Services, we can change the BackgroundImage display by setting the BackgroundRepeat property. After embedding the image as a background image, the size of the image will be fixed from the original size. Therefore, if the image size is different from the report size, the image will not fit the report.
In order to meet the requirements, I suggest that we can use other tools to change the size of the image to the value you need and adjust the size of the rectangle in the report at the same time. Then embed the image as the background of the rectangle.
Hope this helps.
Best Regards,
Joy


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


04.jpg (48.4 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

This does work and is the approach I ended up taking. I used good old Paint to resize the original to 64% and then cropped a small slice off the top after which, most of the graphic showed as the background of my rectangle, enough to look good.

My real point is that I would have preferred to use an Image control which allows me to size the graphic to fit the space rather than using external tools. Having done that, why can't I get the text box I place on top of that to show the text in preview mode?

As I have this workaround, it is hardly urgent but it seems to me that Bring To Front should mean that the white text shows on top of the blue graphic.

0 Votes 0 ·