-
Empty Reports
Hi,
Do enyone know how I can check if a report doesn't have any data?
I have a routine that automatically created the reports then send them out. But, I've just noticed that it was sending out empty reports. Usually, when the recordset returns no data that the report is empty (with no data)....
Thanks in advance for any help.....:)
-
You can always bring up the report in Crystal Report Writer and right click on a data filed and browse the data. If nothing is there, the there is no data.
-
Hi,
Do you know how to do it using VB code?:(
I want to add this checking into my automation routine....
Thanks.
-
Report Designer
If you are using the Crystal Reports designer in your vb project you could use the the No_Data event. If you use crystal 8.5 developer you should have a sample called "No_Data_In_Report_Event" in your sample code folder. Let me know if you dont have it.
Good Luck :D
-
Hi,
Unfortunately I'm not using the designer...
I use the Crystal report object to open up the report
then export it as PDF....
Here's portion of the code....*****************
Set objCrystalApp = New CRAXDDRT.Application
Set objCrystalReports = New CRAXDDRT.report
Set objCrystalReports = objCrystalApp.OpenReport(repPath, 1)
ExportOptions.FormatType = crEFTPortableDocFormat 'pdf
ExportOptions.DiskFileName = strSaveTo & rstRep!RepCode & "_" & rstRep!JobID & ".pdf"
objCrystalReports.Export False
'*************************:(
-
Hallo
Sorry to say that i cant find anythying else that checks for "no data" in a report.
You will either have to make use of the designer or pass recordsets through code to your reports and then check if any data is present.
:mad:
If there is any other way i would really like to know tooo...Anybody else ....?
Good Luck
:D