Solved

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now