Solved

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

Posted on 2009-07-14
2
479 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

740 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