How do you overlay a text box on an jpeg image?

  • This may appear to be a daft question but I can't figure our how to do it.

    Within a report I have a full-width image, the corporate logo. On the left side of the image I need to overlay a text box. Sounds easy so here are the steps that I took:

    * Added image (a jpeg)

    * Added text box and positioned it on top of the image

    * Checked the z-ordering: image:0 , textbox: 1

    Entered preview mode and the textbox was positioned vertically AFTER/below the image.

    How can I achieve my goal? Solutions appreciated.

  • I am not aware that you could over lay a text box on image however you could place a text box either to the right or left of an image. You also need to make sure the image is small in bytes so you may need a Gif instead of JPEG.

    Kind regards,
    Gift Peddie

  • It can be done in HTML, eg in VS2008, so I'd expect SSRS2008 to support it.

  • I am not sure SSRS 2008 can consume html because it no longer uses IIS to render by default but you can use IIS.

    Kind regards,
    Gift Peddie

  • The concept of using a background image should be common practise. The fact that the report designer supports a Z-plane means that overlaying objects should be possible. If not then I think that SSRS2008 has a serious issue.

  • There is background image but I don't think it is with a textbox more like from the database with rectangle. If you get it to work post your code.

    Here is the docs and an article see if you can use it.

    http://msdn.microsoft.com/en-us/library/ms155810.aspx

    http://qa.sqlservercentral.com/articles/Development/3184/

    Kind regards,
    Gift Peddie

  • I've found two solutions, or rather work arounds, that are both related to background images:

    1) Modify the "Title text" text box's properties:

    a) Set the full-width image as the text box's background image.

    b) Use the text padding properties to position the text.

    c) Resize the textbox to the width of the image

    2) Place a rectangle on the document and set its background image to the require image. The Z-ordering is then honoured when a textbox is placed on top of the rectangle.

    This works but it still begs the question as to why the Z-ordering is not honoured whenever an image is placed directly.

  • Number 2 is how I know you can do it, about using image directly could be related to restrictions of where the image is consumed in a report. What you do with image in the body of the report is different from image in header and footer.

    Kind regards,
    Gift Peddie

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply