nandu
nandu

Reputation:

Total pages in a report using Report Viewer

I want to get the total number of pages in a form, which is placed in Report Viewer..

I used this code, actually the report has 5 pages but I got only one page.

int t=int T = objReportViewer.LocalReport.GetTotalPages();

How can I make it give me all 5 pages?

Upvotes: 0

Views: 3655

Answers (2)

basti
basti

Reputation: 2689

In C# with ReportViewer 2010, a

reportViewerName.PageCountMode = PageCountMode.Actual;

did the job for me.

PS: Just seen, this thread is more than 1 year old, sorry!

Upvotes: 2

gbn
gbn

Reputation: 432672

Use Globals.TotalPages?

Example for a text box: =Globals.PageNumber & " of " & Globals.TotalPages

Upvotes: 1

Related Questions