Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Page number information available in report body

1,464 views
Skip to first unread message

Catalin Magher

unread,
Apr 10, 2007, 4:46:17 PM4/10/07
to
Hi Group,

How can I get the page number while in report body ? I need to show/hide
some controls, depending on the page number.

Any solution is welcome !

Thank you,
Cata


EMartinez

unread,
Apr 10, 2007, 11:28:07 PM4/10/07
to
On Apr 10, 3:46 pm, "Catalin Magher" <cmag...@era-environmental.com>
wrote:


Normally, to use Globals!PageNumber, you have to be in the Page Header/
Footer. That said, this link might provide you a work around:
http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/2eee17d147fb5603/dda039e65c969ce2?lnk=st&q=get+page+number+in+report+body+reporting+services&rnum=1#dda039e65c969ce2
Hope this helps.

Regards,

Enrique Martinez
Sr. Software Consultant

je...@humphries.com

unread,
May 16, 2007, 7:19:51 PM5/16/07
to
This is an older post, but I tried to find a solution in the forum and
found many with the same unanswered question.

This is how I worked the problem. What you are doing is having the
Report call the global function and pass to a string and then you are
calling the function return str and inserting into the textbox!

Add the following code to the Report properties (main menu
REPORT>Report Properities > Code )

Public Function PageNumber()
Dim str as String
str = me.Report.Globals!PageNumber.ToString()
Return str
End Function

Public Function TotalPages()
Dim str as String
str = me.Report.Globals!TotalPages.ToString()
Return str
End Function

Now add the following function calls to empty textboxes
=Code.PageNumber
=Code.TotalPages

ahmadalkilani

unread,
Mar 5, 2010, 2:31:59 PM3/5/10
to
I think the previous solution using code always shows Page 1 of 1, at least in my tests on SSRS 2008.

There's another solution is you can determine or customize the number of rows per page.

http://www.easkills.com/ssrs/determinepagenumberinssrs20052008

jer wrote:

This is an older post, but I tried to find a solution in the forum andfound

16-May-07

Previous Posts In This Thread:

On Tuesday, April 10, 2007 4:46 PM
Catalin Magher wrote:

Page number information available in report body
Hi Group,

How can I get the page number while in report body ? I need to show/hide
some controls, depending on the page number.

Any solution is welcome !

Thank you,
Cata

On Tuesday, April 10, 2007 11:28 PM
EMartinez wrote:

Re: Page number information available in report body


On Apr 10, 3:46 pm, "Catalin Magher" <cmag...@era-environmental.com>
wrote:

Normally, to use Globals!PageNumber, you have to be in the Page Header/
Footer. That said, this link might provide you a work around:
http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/2eee17d147fb5603/dda039e65c969ce2?lnk=st&q=get+page+number+in+report+body+reporting+services&rnum=1#dda039e65c969ce2
Hope this helps.

Regards,

Enrique Martinez
Sr. Software Consultant

On Wednesday, May 16, 2007 7:19 PM
jer wrote:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Join Lists with LINQ - SharePoint 2010
http://www.eggheadcafe.com/tutorials/aspnet/b0c1cd0d-fe82-444e-a16e-7d3fb7d38eca/join-lists-with-linq--sh.aspx

0 new messages