cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the Report Page count using crystal reports 2008

Former Member
0 Kudos

Hi,

I have to implement a business logic where in i will have to display the no. of pages generated for the report

Say for e.g. crytal report that's generated spans 25 pages in the report.

Then i will have to display a message to the user after the report generation something like "25 Pages generated"

So, how would i get this report page count so that i can fetch the value and display the same to the user.

Any sample code snippet would be of great help.

Thanks in Advance

Regards,

Ramnath

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Moved to .NET Development - Crystal Reports forum.

Please search for your answers first. Typing in "page net crystal" in to the search box at the top right of this page retrieved the following KBase

[1216240 - How to retrieve the number of pages from a ReportDocument in VS .NET|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]. I think that has the info you are after(?).

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

Former Member
0 Kudos

Hi,

I am using crystal reports 2008 and i visited the link forwarded in your previous mail and got the solution for getting the lastpagenumber of the report.

nPages = crReport.FormatEngine.GetLastPageNumber(New CrystalDecisions.Shared.ReportPageRequestContext)

but, i don't find FormatEngine property for ReportDocument object.

I just wanted to know whether this property is availale in crystal reports 2008 or should i even install any service packs for this.

Please find below the namespaces that importing in my class

Imports System.Windows.Forms

Imports System.Drawing.Printing

Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.Shared

Imports CrystalDecisions.Windows.Forms

Imports CrystalDecisions.CrystalReports.ViewerObjectModel

Imports CrystalDecisions.Shared.ReportPageRequestContext

Please let me know how can i get the formatEngine property for reportdocument object

Thanks in Advance

Regards,

Ramnath

former_member183750
Active Contributor
0 Kudos

Yah. It does not intellisence but it's there.

Ludek

Answers (0)