Duplicate data using a report schema transformation

You can use the report schema transformation (.rst) to duplicate data in the report.

About this task

With other data schemas, the data is streamed only once, one record at a time. With a report schema transformation, the data can be reused. You can use the same data in multiple ways, for example, provide a summary at the top and details at the bottom of the report.

  1. Create the report schema transformation by selecting File > New > Reports > Report Schema > Schema Transformation (.rst) and clicking OK.
  2. On the Source Selection and File Location page, set the Schema Location to the data schema you want to transform, and the Schema transformation file path to the filename of your new .rst file. Click Next.
  3. On the Data building page, select one or more fields in the left panel and click the right arrow. The data appears in the right panel under Report.
  4. Click the right arrow again to add the data as Report2 in the right panel.
  5. Repeat as many times as required. The number is incremented for each subsequent report, Report3, Report4, and so on.

    When you duplicate records, the fields in the duplicated reports are no longer unique. For example, orderid in Report is also called orderid in Report2. It is fine to keep these non-unique names if you intend to use the data elements as children of their respective OnEveryRow triggers in the Report Structure. However, if you plan to use a data element with a non-unique element outside of the OnEveryRow trigger (for example, as a child of a Group trigger node), the Report Designer reports an error. To use these duplicated data elements in a different part of the Report Structure, you must rename one of the two fields in order to provide each element with a unique name. Field renaming is done on the Data building page of the wizard.

  6. Click Finish to create the .rst file.
What to do next

In the report design document, attach the report schema transformation as the data source. Add the report elements to contain the data, and rearrange the Report Structure so that the data is displayed as required.

Figure 1 shows a sample structure (from the RevenueAnalysis.4rp report in the Reports.4pw demo).

Figure: Report Structure with duplicated reports

This figure shows the Report Structure with reports inside Mini Pages, Charts inside Reports, and Chart Items changing On Every Row.