Solved

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

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

729 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