locked
Printing a conditional line in SSRS 2008 R2 Page header RRS feed

  • Question

  • I'm working on an invoice batch report in SSRS 2008 R2 SP1. 

    The company's logo, customer name and address,invoice number, invoice date and the text "INVOICE FOR SERVICES RENDERED" appear only on the first page of each invoice (from the line. 

    On second and subsequent pages of each invoice, just the customer name, invoice number, invoice date and the text appear and should be followed by a line.  This content is set up in the page header.  All the content is working beautifully (love the page number reset capability on a group break and the ability to name a page), EXCEPT the line under "INVOICE FOR SERVICES RENDERED" shows up on second and subsequent pages of the invoice when viewed in Report Manager, but is nowhere to be seen if the invoice is printed, or rendered in PDF.

    I have tried to print the line using a line control as well as having it as the bottom border of the "INVOICE FOR SERVICES RENDERED" textbox.  Same result (or lack thereof!) - line is visible when viewed but not when printed or rendered as a PDF.

    I've looked at all the cumulative updates since SP1, but didn't see this issue.

    Any help with this is appreciated!


    Mary

    Friday, April 13, 2012 12:32 AM

All replies

  • Hi Mary,

    According to your description, I have tested the issue in local environment and everything goes well. Could you elaborate the issue by showing us how the description textbox is designed, especially the expression that controls the visibility of the underline? This will be helpful for us to resolve the issue.

    At this time, I have posted my steps that are used to control the visibility of the underline just for your reference:

    1. Right-click on the textbox which contains the invoice description in the Page Header and open the “Text Box Properties” dialog.
    2. Click “Font” tab, click the expression of “Effects:” and set the expression as follows:
      =IIF(Globals!PageNumber<>1,"Underline","Default")

    Reference:
    How to: Hide an Item

    If you have any questions, please feel free to ask.

    Regards,
    Mike Yin

    Monday, April 16, 2012 6:05 AM
  • Hi Mike,

    Thanks for your post.  It worked somewhat - the underline is there, and I can extend it to the edge of the page by preceding and following the "INVOICE FOR SERVICES RENDERED" with blanks.  The only problem with that solution is that the underline is too close to the text, making it look different than the first page of the invoice. It is tedious to get the correct number of blanks so the underline goes all the way across the page - not quite as precise as the width of a text.

    I also tried another text box that contained underlines as text - same thing.  It shows up when I view in Report Manager, but not when I print.

    Here is how my textbox had the line set up:

    1.  The text box is 7.4099 wide (the width of the printable page)

    2.  The selectedtext Value property is:

          =IIF(Globals!PageNumber=1,"","INVOICE FOR SERVICES RENDERED")

    3.  The textbox BorderStyle Property is:  =IIF(Globals!PageNumber=1,"None","Solid")


    Mary

    Tuesday, April 17, 2012 10:19 PM