Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Record Count from Crystal Report 1

Status
Not open for further replies.

syerin

Technical User
Oct 19, 2001
6
0
0
GB
Hi,

I'm currently running CR 8.5 and using visual basic to access the database in my report via LogOnServer method. I need to find out whether the recordsets are empty and if so, display a msgbox informing the user about it. I tried the following but the number of records returned wasn't correct.

Dim crxPgEngine As CRAXDRT.PageEngine
Set crxPgEngine = Report1.PageEngine
MsgBox CStr(Report1.PrintingStatus.NumberOfRecordRead), , "recordsread"

Can anyone help? Any help is greatly appreciated. Thanks.

cheerios.


 
Why not just take the query from the main report and execute it in VB before you get to Crystal, just changing the SELECT field,... to SELECT COUNT(*) FROM ...

If the record count is zero, then display the message, otherwise execute the Crystal report.
 
Hi Balves,

thanks for your help :) Really appreciate it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top