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!

Infoview Scheduler - Do not run if no data or... 2

Status
Not open for further replies.

ajharn

IS-IT--Management
Jun 8, 2002
71
0
0
US
Hi All,

I use the Infoview scheduling option to run certain reports periodically.

Is there a way Suppress the run of a scheduled report if there is no data matching the report criteria?

Appreciate any help.

Thanks,
AJ
 
Do you want to stop the run or not show it in the history?

Im not sure if this will help but in the past we have had reports that get emailed out but could be empty very often so didnt want them emiled if they were.
To get around this we set the report up to have an empty page as the first page and data is then shown on the second.
Then we set the schedule up to only start printing on page 2. This means that when there is no data, page 2 dosent exist so the schedule failes.
 
How can you tell if there is no data for the report, without actually running the report?

You could do a section that is only displayed when some basic value like an account number is null, i.e. no data. That tells people that the report was run and found nothing rather than being lost or forgotten about.

Does that help?

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
@Bloke152,

Yes, this is exactly what I want to accomplish. Can you give me a quick overview of how you set the schedule to start printing on page 2? I'm not familiar with that. For a blank Page 1, I'm assuming you did a "New Page Before" or similar in the section expert. I would really appreciate it.

@Madawc,
I use this method for some other reports, but in this situation I would vastly prefer not to e-mail the report at all. Thanks.
 
Hi,

In the report, section expert, check new page after the report header. Then, in the File/Report Options, check the <Suppress printing if no records>. This will make a blank page 1 if no data is available.

Dana
 
I think there are different ways depending on the format you want your export to be in.
The easiest way is to format as pdf and set the shedule to only do pages 2 to 2 (Im not sure what will happen if you need more than 2 pages but I asume this will handle them, if not the second value may need increasing) and that should set the schedule to do as I described above. The email will get sent if there is a second page and if there isnt then the schedule will fail.

Another way is to set up a dummy printer on the server and set this printer in the specify printer section on the print settings tab, then set that to only do pages 2 to 2.

The second method allows you to be able to run schedules that export to crystal etc.
 
This worked.

I did as @ianoctdec suggested to get the report to be only 1 blank page if there was no data.

Then I did as @Bloke152 suggested and set the report to PDF format and to print pages 2-999.

Worked like a charm.

Thanks very much for the help.

Cheers,
AJ

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top