SSRS show value only on last page in body of report
Asked Answered
E

7

12

I'm attempting to show a sum in a table footer on a report. It will be in the body of the report and can't be in the header or footer. The table footer repeats on each page but should show the sum only on the last page. It will show another piece of text on all other pages. Is this possible?

Additional pieces of information: The detail part of the table isn't a consistent height, but the page is a consistent height. I can't assume a standard number of detail items per page.

Just to be clear. I was talking about adding it to table footer and not the page footer. It should still be in the page body.

Ensample answered 17/11, 2009 at 20:23 Comment(0)
A
1

Can you not just create a group that includes a group footer. Then in the group properties make sure that the "Repeat Group Footer" isn't checked and Sum() the total in the group footer?

Amylum answered 18/11, 2009 at 15:38 Comment(1)
That is not an answer. It's another question. Why was this even voted?Synod
S
17

I simply resolved it using ...

=iif(Globals!PageNumber=Globals!TotalPages,false,true)

Put that in the Expression editor for the HIDDEN property of all the objects/controls you have in your footer.

It will only show you the footer once the last page is processed.

I hope that's what you meant/want? Thanks

Synod answered 12/2, 2014 at 4:44 Comment(2)
Not OP, but I had a similar problem and this worked for me. Thanks!Kaczmarek
The downside of this is that the space reserved for the footer is still visible - as is shown here in the comment section and I tested too :( This works if your footer is and the report itself has the same the same color, though.Wapentake
M
1

try something like this

=iif(Globals!PageNumber=Globals!TotalPages,data,nothing)
Malarkey answered 17/11, 2009 at 20:49 Comment(3)
You can't use globals in the page body.Ensample
well you contradict yourself a couple of times in your post, stating that you do and then don't want it in the footer. which is it?Malarkey
I want it in a table footer, not the report footer.Ensample
A
1

Can you not just create a group that includes a group footer. Then in the group properties make sure that the "Repeat Group Footer" isn't checked and Sum() the total in the group footer?

Amylum answered 18/11, 2009 at 15:38 Comment(1)
That is not an answer. It's another question. Why was this even voted?Synod
E
1

Below solutions can help.

1. Create Functions to access Page Number in Body

https://mcmap.net/q/794333/-access-page-number-in-report-body-in-ssrs

2. Add a rectangle

Add a rectangle with required Textbox or other controls in it and set the visibility of Rectangle like below:

=IIF(code.PageNumber=code.TotalPages,false,true) 

This will show the Rectangle as Footer only on last page.

Enjoin answered 17/6, 2021 at 15:15 Comment(0)
B
0

Just add a textbox below the table. The textbox will be visible after the last page of the table.

Brynne answered 14/11, 2017 at 22:52 Comment(0)
M
-1

if you want it in the body, if the rest of the report's layout shifts dynamically, it won't render in the same spot. otherwise it should render in the same spot and you can just put it at the bottom of the last page.

remember, a page is 8 1/2 x 11. if you have 1 inch margins, the first page ends at 6.5 inches.

Malarkey answered 17/11, 2009 at 21:31 Comment(0)
S
-1

Hidden:

=iif(Globals!PageNumber=Globals!TotalPages,data,nothing)

use the above one on the hidden property of the footer.

Syndicate answered 21/11, 2013 at 1:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.