Before you begin: Create a report definition to use as a subreport. For more
information, see Creating advanced reports.
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.
What to do next: Perform a test-run of the report by clicking .
- 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.For example: Enter SUBREPORT1
- 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.For example: Select More than 1 row if you want to fetch
address data that includes multiple rows, such as the city name or
- 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.For example: Select the Columns to include check box to
reference the data in the Edit columns section of
the Query tab.
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.For example: Select Label.
- 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.For example: Select Include only matching rows from both
reports to fetch matching records from the subreport and
the main report.
- Click Submit.
- In the upper-right corner of the report definition, click