Total pages in a report using Report Viewer

醉酒当歌 提交于 2019-12-11 17:13:29

问题


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?


回答1:


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!




回答2:


Use Globals.TotalPages?

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



来源:https://stackoverflow.com/questions/767713/total-pages-in-a-report-using-report-viewer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!