Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 12th, 2003, 09:55 AM
Registered User
 
Join Date: Dec 2003
Location: , , .
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
Reply With Quote
  #2 (permalink)  
Old December 14th, 2003, 01:44 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik Send a message via Skype™ to melvik
Default

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

Always:),
Hovik Melkomian.
Reply With Quote
  #3 (permalink)  
Old December 15th, 2003, 09:30 AM
Registered User
 
Join Date: Dec 2003
Location: , , .
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
Reply With Quote
  #4 (permalink)  
Old February 3rd, 2004, 05:07 AM
Registered User
 
Join Date: Feb 2004
Location: , , United Kingdom.
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.

Reply With Quote
  #5 (permalink)  
Old May 27th, 2004, 02:31 AM
Registered User
 
Join Date: May 2004
Location: , , .
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


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 04: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



All times are GMT -4. The time now is 02:31 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.