Reputation: 398
Lets say I created a report for clients. Is it possible to generate/create the report for all clients in a certain list? In other words, can i create a report that will loop/cycle over/through a list and create the report for each x in that list?
Don't know a way to describe it better i'm afraid.
Upvotes: 0
Views: 2159
Reputation: 21703
Yes you can, this is exactly what sub reports will do.
So assuming you have a report that shows data for a single client and also assuming that this report takes one or more parameters (e.g. ClientID) then all you need to do it the following...
Create a new report.
Add a dataset that contains a list of ClientID
s that you want to produce a report for. You can optionally parameterise this dataset query just like any other dataset.
Now add a table to your report then set the dataset property of the table to point to your dataset containing your ClientID
s.
In the table, on the detail row, right-click the first cell and choose 'insert => subreport'. The 'cell' will be filled with a subreport placeholder. Right-Click this and go to subreport properties. Choose you original report as the subreport. On hte parameters tab, add an entry. Set the parameter name of the target report's parameter (this should appear if you click the drop down). In the value field set this to be the CLientID from your dataset (again the drop down should provide a list of available fields).
You can remove any unused cells in the table if you like.
When you run the report, the subreport will be executed for each entry in your dataset.
Hope that helps.
Upvotes: 4