简体   繁体   中英

How to get Total Page Count in Reportviewer

I am developing an window application where i need to get total pages in Rdlc report viewer.

So please tell me how to get total page count.

Here is my Code, which is not working and always show 0 :

Dim TotalPage As Integer = ReportViewer1.LocalReport.GetTotalPages(PageCountMode.Actual)
MsgBox(TotalPageAs)

在此处输入图片说明

In this image total number of page is 6 .

Try using the ServerReport and not the LocalReport, as shown here:

ReportViewer.ServerReport.GetTotalPages() 

For more information, take a look here and here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM