Mike
Mike

Reputation: 21

SSRS Export to PDF Footer Print on last page Issue

Hi I have been working with SSRS for a very long time and this is the first time I have ever seen anything like this so I thought I would post it out there and see if anyone else had this issue and how they solved it, first some background on my environment.

Windows Version: Windows 7 Enterprise
SSRS Version: SSRS 2008 R2

The issue is as follows, I have a report where on the footer I have it set to print on the last page only. If the report is one page or 2 pages long this works fine, only printing the footer info at the bottom of the fist page is one page and the bottom of the 2nd page if two. The problem is when the page is lager then 2 pages, I do not get the footer on the first page as expected however each page after has the footer being displayed. I am really stumped on this one and checked my setting and do not see anything that catches my eye after staring at it for a while now. Thanks in advance for suggestions and help. Mike

Upvotes: 2

Views: 3158

Answers (2)

Stephane
Stephane

Reputation: 11

What I did to work around this weird behaviour, I have put all my element of the footer in a rectangle box and added a visibility condition "=Globals!PageNumber<>Globals!TotalPages" on this box. In the footer properties I have checked the box On Last page.

I works Well.

Upvotes: 1

Jeroen
Jeroen

Reputation: 63830

I think the property PrintOnLastPage is behaving different from what you may have expected: it's rather an opt-out mechanism than opt-in. From your question it seems you're expecting this property to behave as if it is was called Print *Only* OnLastPage instead of PrintOnLastPage.

You cannot set a footer to be printed on the last page only.
You can only set it to be printed on the last page, yes or no.

I suspect the reason you're thrown off is because you may have also set PrintOnFirstPage to false. With 2 pages that the report is behaving as if it only shows the footer on the last page. For a report with 3 pages it will however show the footer on page 2 and 3, for a 4-page-report it will show the footer on 2/3/4 and so on.

To sum things up:

                   | OnFirstPage = True     | OnFirstPage = False
-------------------|------------------------|----------------------
OnLastPage = True  | footer everywhere      | footer on all pages 
                   |                        | except first
-------------------|------------------------|----------------------
OnLastPage = False | footer on all pages    | footer on all pages  
                   | except last            | except first and last

Refer to the MSDN pages for PrintOnFirstPage and PrintOnLastPage for more details.

Upvotes: 0

Related Questions