|
-
Jun 10th, 2003, 10:53 AM
#1
Number of Pages Not in Report but from Object
I'm using Crystal Reports .NEt although I think the object structure is basically the same as in VB6 using CR 8.5 or up. I need to know how pages long the report is but not from within the report itself. In the report you can use the special fields or what not to get this info, but how can you get it from the Report object itself? Can you access those fields at runtime from the object?
I'm using this report in a web form and I created my own navigation links but can't find our if what page I'm on or if there are any more.
-
Jun 10th, 2003, 03:01 PM
#2
This is the code I use in a VB app with Crystal version 8.5. I don't have the NET version so no idea if this will work for you.
Using the CRAXDRT objects you can access the different page and group information through the PageEngine, PageGenerator and Page objects. Use these objects to access the information for any or all the report groups as specified in the GroupPath parameter.
VB Code:
Dim objPageGen As CRAXDRT.PageGenerator
Dim varGroupPath As Variant
varGroupPath = Array() 'Use an empty array to get information for the entire report
Set objPageGen = CrystalReport.PageEngine.CreatePageGenerator(varGroupPath)
Debug.Print objPageGen.Pages.Count
Obvioulsy, the CrystalReport variable is a CRAXDRT.Report object. Note that the above code will cause all the records to be read from the database, if not already done so.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|