Reputation: 681
I have a main report which contains user information -- and a subreport that contains multiple items for said user.
Question is, I need the main report to duplicate as many times as necessary for the number of users I feed into the DataSource -- how can I do this, so that it results in one large report (containing multiples of the main report)?
EDIT: Let me re-ask with a specific example (similar to my own): Let's say I want a report for a grocery shopper -- all of the shopper's demographics would be on the main report, however, there needs to be a section (or subreport) for a specific shopping trip containing all items purchased.
NOW, here is the clencher. I need to run this report for many different shopping trips (this also means different shoppers too).
It might even be better to say that this is a "shopping trip" report, which can run for a batch of shopping trips.
FURTHER PROGRESS: How can I get the grouping to work when my data looks like this:
(shoppingTripId, shopperId, shopperName, shoppingDate, itemBought)
------------------------------------------------------------------
1, 1, Chris, July-24-2009, Computer
1, 1, Chris, July-25-2009, Laptop
2, 3, John, June-14-2009, Ipod
2, 3, John, June-14-2009, Television
The report, if all goes well, would look like this:
+-----------------------------------------------
| Chris ShoppingTripID: 1
| 123 Main Street CustomerID: 1
| Anytown, CA 90210
+-----------------------------------------------
| Computer $999.00
| Laptop $1099.00
+-----------------------------------------------
+-----------------------------------------------
| John ShoppingTripID: 2
| 123 Main Street CustomerID: 3
| Anytown, CA 90210
+-----------------------------------------------
| Ipod $999.00
| Television $1099.00
+-----------------------------------------------
At the moment, I'm getting this:
+-----------------------------------------------
| Chris ShoppingTripID: 1
| 123 Main Street CustomerID: 1
| Anytown, CA 90210
+-----------------------------------------------
| Chris ShoppingTripID: 1
| 123 Main Street CustomerID: 1
| Anytown, CA 90210
+-----------------------------------------------
| John ShoppingTripID: 2
| 123 Main Street CustomerID: 3
| Anytown, CA 90210
+-----------------------------------------------
| John ShoppingTripID: 2
| 123 Main Street CustomerID: 3
| Anytown, CA 90210
+-----------------------------------------------
| Computer $999.00
| Laptop $1099.00
+-----------------------------------------------
| Computer $999.00
| Laptop $1099.00
+-----------------------------------------------
| Ipod $999.00
| Television $1099.00
+-----------------------------------------------
| Ipod $999.00
| Television $1099.00
+-----------------------------------------------
Upvotes: 2
Views: 2592
Reputation: 32690
Move the main report into the details of the report (broken up into subsections for formatting if necessary), and place the subreport into the details as well.
That way, you'll get a main report (plus subreport) for each user.
Edit
The more I think about it, you probably don't even need a subreport. If you join your shopper and shopping trip tables together in the main report, you can put the shopping trip information in the details, all grouped by the shopper ID.
In the group header, you'll put everything that is currently in your main report.
From here, you can pass the report a list of shopping trip IDs as a parameter, and use this parameter in your Record Selection Formula.
You should end up with something like this (edited 2010/07/25):
+-----------------------
| Report Header
+-----------------------
| Page Header
+-----------------------
| Group Header (Grouped by **ShoppingTripID**)
| Display your shopper information here
+-----------------------
| Details
| Display your shopping trip information
| for the shopper here
+-----------------------
| Group Footer
+-----------------------
| Page Footer
+-----------------------
| Report Footer
+-----------------------
Upvotes: 3