data driven report --send max 2 report when records return instead of sending every 10 min I have a data-driven report that is scheduled to run every 10 minutes; it sends the report if any records return.

I'd like to change this so the report is sent out at most twice a day.

For example: Currently, let's say the report generates records on the following runs for a given day:


02:10
08:40
12:20
14:40
16:30
21:50


As things stand now, each of those 6 runs will send the report out. If the process I want was in place, it would have sent the 02:10 and the 08:40 reports, and not sent the other 4 (even though records were generated), because it had already sent out 2 reports this day.

The count would restart at 0 reports sent out at midnight every day.
I would create a table 

CREATE TABLE ReportRuns 
( RunDate Date, RunCounter Int)


The RunDate will contain the Date Portion only. 

Everytime you run the report and there is data returning, you Update/Insert into this Table and increment the counter. If counter is already at 2, do nothing and don't send the report. if a record for the current day doesn't exist or does exist and the counter is 1, then update the counter to 2 and send the report. 
Next time it runs, the counter will be at 2 and the report won't be sent.

HTH.