Solved

Retrieve the number of pages of a group with Crystal Report and VB(S)

Posted on 2009-07-14
2
478 Views
Last Modified: 2013-12-25
The Crystal Reports consists of a group with approximatively 500 elements.
For each of these elements I want to get the number of pages.
(Each element stands for a client for which a couple of pages have to be printed separately)

Sub main
Dim Application
Dim Report
Dim objPageGen
Dim varGroupPath
 
' Export nach CSV mit VB-Script:
 
Set Application = CreateObject("CrystalRuntime.Application.9")
Set Report = Application.OpenReport("C:\CH\Test\Neu\Test1.rpt",1)
	
	varGroupPath = Array(0,1)
	
	' this should retrieve the numbers of pages of this specific group, but 
	'which it does not
	Set objPageGen = Report.PageEngine.CreatePageGenerator(varGroupPath)
    MsgBox objPageGen.Pages.Count
      
       
       
End sub

Open in new window

0
Comment
Question by:Solu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 50 total points
ID: 24856286
As far as I know there is no way to determine that value.

You could run the report for each client individually and get the number of pages.

mlmcc
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question