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.




Reply With Quote