...
In reporting, users expect as much of their data in once place as they can afford, sometimes this means showing several views to the same data, or results from different sets of data. The best way to encapsulate and reuse these views in any reporting system is via sub reportsSubReports. We've always utilized the developer express suite of reporting tools, which has always had it's own solution for sub reporting. We made this tool work with our reporting infrastructure.
To create and add sub reports SubReports to existing reports, you will need:
- Two reports. One that you would wish to become the master report, another that you will use as a sub report.
Creating a Sub ReportSubReport
Any report can be turned into a sub report- including the ones that already exist! To create one, we need only to declare a new report in the same report category as the report(s) that we would like to add it to.
...
Report links and parameter sets cannot be assigned joins, and can therefore not be configured as sub reportsSubReports.
Copying a report that has joins will also copy the joins to the new report.
...
To add a sub report to any report drag this control onto the screen in the band that we would like to see it in. Keep in mind that where we drop the sub report will detremine how many times it is repeated. Dropping a report on the detail line of a period report, for example, will print that report for each row of the period. If we use a period column in our report join the sub reports SubReports will filter accordingly. Dropping it on the report header or footer will print it once for the whole report, etc.
We'll go over this in a bit more detail in the examples below.
...
Here are DevExpress links to their documetation on Sub ReportsSubReports:
https://documentation.devexpress.com/XtraReports/DevExpress.XtraReports.UI.XRSubreport.class
...
This first exercise was to show us how simple it is to create and add a sub report. However, this example only worked out well for us because a.) we only ran the report for one flock, and b.) we set our report dates to one week, and the report to "Period" interval. For complex, filtered, repeated, sub reports SubReports we will have to make a few extra configurations to produce the desired results.
...