Skip to main content
This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.
LinkedIn
Copied!

Define the contents of a data page using a Report Definition

Data pages, known previously to Pega 7 as "declare pages," organize and make available to your application data that can come from a range of sources. In earlier versions, the sources were primarily external, accessed with a connector and a load activity; but beginning with version 6.2, you can use a Report Definition as the data source for a data page.

Report Definitions define reports. These reports, while typically used to display summarized information to a user, can also be used to select values for various internal and display features, including data pages.

Suggested Approach

  1. Prerequisites

    In this example, the Report Definition report uses data from a simple data table. However, Report Definitions can report on any classes from the PegaRULES database, or on flat tables in an external SQL database. For details on using data tables see How to use data tables to reference external and internal systems.
    In this example, you populate a data page using a Report Definition that reports on StateCodes, a pre-existing data table consisting of two properties: two-letter state codes, and an operator ID assigned to process work items that involve that state. Both properties are exposed as database columns. (This report output is static, but reports may in practice produce different, real-time results each time they run.)
  2. Create the source report

    Create a new Report Definition. In the Report Definition: New dialog, enter the name of the data class containing the data table in the the Applies To field. Use the Smart Prompt in this field to find your data class more easily.
    New report definition
    You will use the name of this report when creating the Declare Page.
  3. In the Report Definition form, add columns as necessary to populate the data page. The data table in this example contains only two columns, .StateCode and .AssignedOp.
    Complete the rest of the Report Definition form, ignoring fields dealing with the visual display of the report or sorting, and save the report.
    For more information on completing the Report Definition form, see Report Definition rules - Beyond the basics.

Continue with creating the data page for Pega 7, or creating the declare page for PRPC 6.2-6.3 SP1.

4a. Create the data page (Pega 7)

  1. In the Designer Studio, select the Data Explorer in the explorers area to the left.
    Data exporer
  2. You can then click either menu icon (the general one for the data explorer, or the one beside a data object type you have selected--marked with red rectangles in the image below) and use the option to create a new data page.
    data explorer menus
  3. Make sure the data page structure is List.
    In the Data Sources section, select Report Definition for the Source, then select the Report Definition you created from the options in the Name field.
    report definition as source for data page
  4. Save the data page. The data page and contained properties are now ready to be referenced by your application.

Return to step 3

4b. Create the declare page (PRPC 6.2 - 6.3 SP1)

  1. Create a new Declare Page. In the Page Class field, use the SmartPrompt to enter Code-Pega-List.The contents of the Data Source section change depending on which option (Load Activity or Report Definition) is selected.
  2. Select the Report Definition option.
    Declare Page Definition Tab
  3. In the Report Definition Class field, use the Smart Prompt to enter the name of the data class your Report Definition referenced in the Applies To field. In this example, this is the StateCodes data class.
  4. In the Report Definition field, use the Smart Prompt to enter the name of the Report Definition created previously.
  5. Save the Declare Page form. The Declare Page and contained properties are now ready to be referenced by your application.

Return to step 3

Accessing the Data Page

While the data page now exists, instances of the page are not actually created on a requestor's clipboard until something in the application accesses a property on the data page.

For example: create a new decision, using the a property from the data page you created as one of the decision criteria. Save and unit test the decision shape. An instance of the new data page is now visible on the clipboard tool in the Data Pages node (previous to 7.1, in the Declared Pages node).

For more information on creating and referencing data pages in your application, see Understanding data pages.

Did you find this content helpful?

33% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us