Save time and enhance the process of creating reports by referencing data
from other reports. You can use another report as a filter to include or exclude
specific data in your report.
The report that you reference becomes a
subreport, which means that it provides data to your main report. By using join filters, you
can reference report definitions from multiple classes. For example, in a financial report
of the company, you can include a subreport with a property that fetches the most recent
expenses of employees. This approach provides a way to filter the contents of the main
report to display how the recent expenses affect the company budget.
- In the navigation pane of Dev Studio, click
Records, and then click .
- In the list of report definitions, click the report definition that you want to
use as the main report.
- On the Query tab, in the Edit
columns section, define the contents of your main report.
- Add the subreport to your main report:
- On the Data Access tab, in the
Sub-reports section, click Add
- In the Prefix field, enter a unique alias for
the subreport that you want to reference in the main report.
The system uses prefixes to reference correct subreports.
- In the Class name field, specify the class to
which the subreport applies.
- In the Name field, select the subreport.
- Define how you want the subreport to function:
- Click Configure, and at the top of the
Configure sub-report use dialog box, specify
how many rows from the subreport to display.
- Optional: To specify which fields in the main report reference the subreport
data, in the Where will you use this sub-report?
section, select a specific check box.
By default, the Right hand side of the filter
conditions check box is selected.
- In the How will you join rows in the reports? section,
specify the join conditions:
- Click Add join condition.
- In the Sub-report column list, select the
subreport property that you want to match with the main report.
- In the Value field, select a property of the
main report that matches the subreport property.
- In the Do not match rows list, select how the
system joins data.
- Click Submit.
- In the upper-right corner of the report definition, click