Prevent Emailing Report if there are no records

, ,

I created a BAQ, and an RDD and added the BAQ to that. Then I created a new report and report style, set the fields accordingly, edited the report in Report Builder, saved everything and ran it. It works great!

Now, the issue is how to handle things if there are no rows returned in the BAQ. Currently it still creates the report and opens up a blank PDF. Ideally, I would like it to error out like other reports would, showing “No Records Returned” in the System Monitor.

Is that possible with an RDD based off of a BAQ?

I did not know this was the typical behavior for an RDD with a BAQ as its data source. I am curious what others have to offer on the topic.

This is the way my emailed reports work. Maybe it is the method you created it?

I write the BAQ, then use BAQ Report Designer to create the RDD and the Report Style.

That could be. I could try to do it as a BAQ Report and see if that makes it work the way I am aiming for.

FOLLOW UP: Yup…that worked. Thanks, @hackaphreaka !

So there is a built in functionality with BAQ reports that prevent sending an email if there is no report… but we’re saying that if you set up an RDD report with a BAQ as the data source and try to email that, it will send an empty email if there is no data returned? I still would be interested if there was a way to create that functionality because I have some reports that can’t be a BAQ Report because there are multiple BAQs used in the report.

So how do you email the report? Do you user Report routing or do you configure the report as an email then schedule it?

I have scheduled reports with the email format. I thought about configuring it using APR and then only send the email if there is data returned. But I’d have to re-do all the reports… not the end of the world. Just wondering if there was another way.

Just setup the routing on the report style and reschedule

Maybe more happy accident than built in functionality. I think it just chokes when the query returns no records and just never gets to the emailing part of the process.

So what happened to the Idea… Friday is very close

1 Like