I have a custom report that has a page footer but it is printing on each page not just the last. Do i need to create a Report Footer?
I don’t think there is such a thing as a Report Footer in SSRS.
And that “Print on Last Page” option is kind of deceptive. My first thought was with that checked, that it would only print on the last page. But that option allows you to esclude it from only the last page.
And since SSRS doesn’t know how many pages the output renders to, you can’t even use a formula on the visibility of the fields in the footer (to hide them on all but the last page).
so basically all or none?
No.
“All” or “All except last”
Looking into something I just saw in Stack Exchange. Someone said the setting the visibility of each item with:
=iif(Globals!PageNumber=Globals!TotalPages,false,true)
should work. For some reason I recall that not being an option. I’m going to try it.
According to Report Builder 3, TotalPages can be reset by using a Page Break, while OverallTotalPages isn’t reset by page breaks.
I’ve had reports with a “Page X of Y” in the header and footer using these Globals, but I’ve never used them to hide textboxes like this. It should work, though.
While
iif(Globals!PageNumber=Globals!TotalPages,false,true)
does work for hiding elements in the Footer, it doesn’t recover the space used by the footer.
I made a simple report (header is green, body is magenta, and footer is cyan). Added a textbox to the footer and set it’s visibility using the formula above.
It does hide that textbox in the foort on all pages but the last, but doesn’t recover the space used by the footer.
Here’s page 1 (see how the footer area is still there)
Here’s the last page. Footer text is shown
and for what it’s worth …
=iif(Globals!PageNumber=Globals!TotalPages,false,true)
cannot be used outside of a header or footer. So you can’t make a pseudo footer in the body and hide it using that.
I wonder if I move it to the body and only print on last page that way??
If you move it to the body, it will naturally only print on the last page. You just can’t force it to be aligned at the bottom of the page.
I will try it and see how it looks. They may be ok if just on last page but not at bottom.