Wrox Programmer Forums
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 12th, 2003, 10:55 AM
Registered User
 
Join Date: Dec 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Total Page Count

Hi,
how can i know how many pages i'm going to print in my Crystal Report file?

ty

a lost soul
 
Old December 14th, 2003, 02:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

look for Formula editor there is PageNumber & TotalPageCount.
HTH.

Always:),
Hovik Melkomian.
 
Old December 15th, 2003, 10:30 AM
Registered User
 
Join Date: Dec 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry, i've been not clear...
I need to know how many pages htere are in my report FROM my C# code, out of my report (i print already those special fields in my report)

Ty for ur time :)

a lost soul
 
Old February 3rd, 2004, 06:07 AM
Registered User
 
Join Date: Feb 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by denis74hd
 Sorry, i've been not clear...
I need to know how many pages htere are in my report FROM my C# code, out of my report (i print already those special fields in my report)

Ty for ur time :)

a lost soul
I would use the following chunk of code in the onload event

If viewstate("maxPage") Is Nothing Then
            CrystalReportViewer1.ShowLastPage()
            CrystalReportViewer1.ShowFirstPage()
End If

Then in the CrystalReportViewer1_Navigate Event
  If viewstate("maxPage") Is Nothing Then
            viewstate.Add("maxPage", e.NewPageNumber)
  End If


U then have a max page number, not elegant but was only solution i could come up with.

 
Old May 27th, 2004, 02:31 AM
Registered User
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to comi Send a message via Yahoo to comi
Default

Try this:

Dim intPageCount As Integer = objReport.FormatEngine.GetLastPageNumber(New CrystalDecisions.Shared.ReportPageRequestContext)

I hope you can deal with VB code. :D







Similar Threads
Thread Thread Starter Forum Replies Last Post
Total Count of Specific Records in a Report Odeh Naber Access 5 August 1st, 2007 03:50 AM
count the TOTAL number of segments crmpicco Classic ASP Basics 2 February 1st, 2005 05:03 AM
Getting Total Page Count eman2a Crystal Reports 0 August 11th, 2004 10:53 AM
Sub Total, Count discriminating dkaco BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 July 23rd, 2004 12:04 PM
How to count total record in CR.NET nan Crystal Reports 0 June 23rd, 2004 11:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.