scheduled reports


how can i prevent from sending empty reports?

i have a schedule report that runs every morning ,
sometimes there are no records that match the report criteria, and the report is empty .

how can i prevent from the system to send an empty report

This functionality does not exist, you will have to do it by customizing in some way.

I never tried this, but maybe you could achieve it a workflow that runs a few minutes before the time of the Scheduled Report.

This Workflow checks the underlying module for any existing records. For example, if your Report lists Leads, then it would be a Leads workflow. Then if the conditions are met, it would set the Scheduled Report to “Active”; if not, then set it to “Inactive”.

If you can’t get this to work, then a custom PHP job to fire the Report could check all necessary pre-conditions.

1 Like

Sorry to dig up an old thread but I’d really love some help on this topic.

I really like the simple and effective built-in reporting module, with the scheduler to email the report.

But, I hate that it can’t be intelligent enough to avoid emailing me blank reports.

Could someone guide me on the PHP that I could write an “upgrade safe” method for a scheduled event to do the following:

  • Run all reports and evaluate the number of rows returned by each report.
  • For each, save the output to a field in the report.

After this, I assume I can have a workflow execute “on any change” to this field, to set any scheduled reports to inactive if rows=0.

Or, more directly, perhaps I can modify the Report Scheduler itself to do this check during execution.

Would be a nice new feature.

Have you looked into the PHP code for the scheduled_reports files?