Reporting - Is There Templates?

I have a report made that is scheduled and sent at month end to one person. But now I need almost the same report sent to more people. Basically the only thing that changes is the SQL query’s WHERE clause for that specific person and obviously the recipients email.

Instead of making a bunch of different reports for each person is there some sort of template I could make? I’m hoping to avoid making 100 reports and then have to make a change to all of them eventually.

Or maybe there’s some alternative way?

Thanks!

Feed in the username and the email address as parameters, then run the queries yourself using system.report.executeAndDistribute.

ohhh okay, that looks promising. I’ll look into that further.

Where would I call that? And how do I pass in a parameter to change the SQL query?

In the report designer, in a SQL Query datasource, if you type a ? it will automatically open a parameter substitution dialog that lets you bring in report parameter values:

You would just run the script once from the gateway - maybe a timer script that runs ever hour, checks if it’s on the right date (of month) and time (of day, depending on when you actually want this sent out).
Then, in the script, either have a hardcoded list, or retrieve (however you need to do so) the list of users to send this report out to. Then loop through that list, executeAndDistributing the generated report.

ok, I’ll give that a shot… Thank you!

I can’t seem to get that Parameter list to show up though. Not sure if it’s hidden somehow? I am on 8.0.3.

oops sorry, just realized I forgot the ?

2 Likes