Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
duanecwilson
Constraint Violating Yak Guru
273 Posts |
Posted - 2009-06-18 : 13:53:46
|
I am writing reports that will need to be run automatically - one report for each of, say a dozen branches. The way it is being run is a user selects one branch, then runs it; then he opens the report again, selects the next branch, etc.I have been told to write a report for each branch in order to automate them and hard code the branch. Of course, this will work, but if the report needs to change, I will have to change a bunch of them.Here is my questions: First of all, how can I run these reports, feeding one parameter after another. (The parameter's datasource is a column in a table at this point). Secondly, would there be a way to output these to different folders automatically depending on the branch?To sum up: automate a single report, running it once for each branch and have the output go to a branch specific folder.Thanks for any help.Duane |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-18 : 14:16:07
|
one way is to create main report which accepts a branch info and give details of it. then create 20 other reports, each having just a subreport which calls main report with one of value of branch. then set subscriptions from these reports to run it and send results. |
|
|
duanecwilson
Constraint Violating Yak Guru
273 Posts |
Posted - 2009-06-18 : 15:05:14
|
Thank you for this response. And if you don't mind, since I have not done this before, how do you "call" a main report from a subreport. Thank you.Duane |
|
|
SQLSoaker
Posting Yak Master
169 Posts |
Posted - 2009-06-18 : 15:53:41
|
I believe what viskah is trying to say is make 20 different linked reports.Under the properties tab click the "create linked Report" button then you can create subscriptions based on the parameters in the main report. |
|
|
duanecwilson
Constraint Violating Yak Guru
273 Posts |
Posted - 2009-06-18 : 16:20:00
|
Oh - that is excellent. I was just going to start drudging through making a number of otherwise identical reports. Thank you.Duane |
|
|
|
|
|
|
|