My requirement is below.
After report refreshed at night, mail should trigger to the business users with report in .PDF format along with record count.
If report is blank (0 records) then the respective .pdf file should not be attached in the mail and in the message body the blank record message should be printed.
Unfortunately, there is no way for the scheduler to know whether there is data in report or not. So, while it’s a simple thing to schedule a report so that it is automatically emailed in PDF format when it’s complete, there is no way in BusinessObjects itself to only send the report if it has data.
There may be third-party tools available to do this, or you could write a program using the SDK that would do something like the following:
Run the query that the report uses to determine whether there is any data.
If there is data, schedule the report to run and send to email.
What if you added a query to the report that failed with a sql error if there were no records in the report? You then setup notification of a failure with the message you want in the email.
The sql error could be generated with something like trying to perform a function on a number. Again, it needs to be tested but something like
to_number(case when RowCount() = 0 then ‘A’ else RowCount() end)
If RowCOunt() = 0 then you get a alpha which can’t be cast to a number. This should cause the report instance to fail.