|
-
Aug 22nd, 2003, 12:41 PM
#1
Thread Starter
Member
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.....
-
Aug 25th, 2003, 08:11 AM
#2
PowerPoster
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.
-
Aug 25th, 2003, 10:12 AM
#3
Thread Starter
Member
Hi,
Do you know how to do it using VB code?
I want to add this checking into my automation routine....
Thanks.
-
Aug 26th, 2003, 04:29 AM
#4
Lively Member
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
Last edited by Joffies; Aug 26th, 2003 at 04:44 AM.
Do, or do not. There is no 'try'.
-
Aug 26th, 2003, 07:55 AM
#5
Thread Starter
Member
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
'*************************
-
Aug 27th, 2003, 09:46 AM
#6
Lively Member
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.
If there is any other way i would really like to know tooo...Anybody else ....?
Good Luck
Last edited by Joffies; Aug 27th, 2003 at 10:05 AM.
Do, or do not. There is no 'try'.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|