Click here to Skip to main content
15,914,243 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to show messegebox to display total no of pages in crystal report.plz its urgent
Posted
Comments
AmitGajjar 4-Sep-12 6:40am    
Go to the last page and get the current page number. :)

 
Share this answer
 
int iPageCount = m_ReportDoc.FormatEngine.GetLastPageNumber(new ReportPageRequestContext());
 
Share this answer
 
Nobody got the solution. Well i found the way to make it work using simple logic:
C#
crystalReportViewer1.ShowLastPage();
            MessageBox.Show(crystalReportViewer1.GetCurrentPageNumber().ToString());
            crystalReportViewer1.ShowNthPage(1);
 Write this on Report Forms load event.
 
Share this answer
 
Comments
mona2013 27-Apr-13 8:05am    
not work

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900