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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I check if no records returned from Crystal Report?

Status
Not open for further replies.

Crystalyzer

Technical User
Mar 28, 2003
218
Hi I am using VB.Net and CR XI

Thanks to some slick advice from some VERY smart people on this site, I have set up a Windows application that exports a Crystal Report to a pdf and then emails it to users automatically. What I am having trouble doing is checking if the crystal report returned any data. I'd like to do this prior to the export so that a file will not be created if no records are returned but I'm not sure how to do this.

Can anyone help me out?

Thanks and best regards,
-Lloyd
 
The only way I have found is to take the SQL code from the CR and run it in VB to populate a dataset. If, given the same criteria passed to the CR (if any), the dataset has no records, don't even call the CR. Oh, and you might want to inform the user, or something. :)



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Thanks Jebenson! I'll try it out!


Thanks and best regards,
-Lloyd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top