Solved

Get Crystal Report Recordcount Using VB6

Posted on 2002-03-05
1
508 Views
Last Modified: 2007-12-19
Hello All,

I'm using Crystal Reports 8.5 and VB6. What I have is an automated process that runs several reports. I would like to load the report recordcount into a variable to be used in my VB code. How do I pull that info. I'm using the following connection string into my Oracle DB. I've also included my print code. Please include an example. I'll give this one high points because it will help me out big time. Thanks in advance for any help you can give me.

Thanks

' Logs onto server in Crystal Reports
  crApplication.LogOnServer "p2sodbc.dll", "O8IPROD", O8IPROD, "username", "password"
 
  ' Prints the Customer Copy Invoices
  Set crReport1 = crApplication.OpenReport("c:\test_invoice_GSCopy.rpt")

crReport1.DiscardSavedData

crReport1.PrintOut False

0
Comment
Question by:mts9
1 Comment
 
LVL 4

Accepted Solution

by:
P1 earned 300 total points
ID: 6841961
Well there's:

Read% = CrystalReport1.RecordsRead
Printed& = CrystalReport1.RecordsPrinted
Selected& = CrystalReport1.RecordsSelected

These work with top level report, if the report itself has sub-reports, total records involved may not be available.

See Developer's Help file for more details.

Enjoy your work,  P1
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

770 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