Often there is a requirement to show the
same information summarised by logically conflicting groups. For example:
showing the total sales for each week within a month and totals sales per team
in a month.
A typical sub report can be used to load
the data again then group it by the second value, and this is the typical way
to use a sub report. But accessing the database again for data you have is a
waste of resources which can be crippling with bigger reports.
The most efficient way to handle this is to
load the information you want into one or more arrays and pass them through to
the sub report to format and group as you want.
It is possible to display the array in the
main report and forgo the need for a sub report at all, but if you are
reporting against a lot of data there is a chance the report will finish before
the array has been fully displayed.