Skip to main content

Creating reports that combine data from multiple classes


2 Tasks

30 mins

Visible to: All users
Intermediate Pega Platform 8.6 Reporting English
This content is now archived and is no longer updated. Progress is not calculated. Pega Cloud instances are disabled, and badges are no longer awarded. Click here to continue your progress in the latest version.


The business partners in the Human Resources (HR) department request two reports.

The first report must track the progress of candidate cases generated in the HRApps application. This report must return a list of open cases and display the status, urgency, assigned workbasket, and current task for each case.

The second report must comply with government regulations that require employees to enroll in a health insurance plan. For each onboarding case, this report must return the last name of the associated employee, the ID of the benefits enrollment child case, the current status of benefits enrollment child case, and the medical insurance plan that the employee selects.

Note: Before you begin, generate five Candidate case instances with varying case work statuses and generate five Onboarding case instances with varying medical plan selections.

The following table provides the credentials you need to complete the challenge.

Role User name Password
Senior System Architect SSA@TGB rules
Note: Your practice environment may support the completion of multiple challenges. As a result, the configuration shown in the challenge walkthrough may not match your environment exactly.

Challenge Walkthrough

Detailed Tasks

1 Create a report that joins classes referencing an association rule

  1. In the Candidate case type, create a report definition named Candidates by workBasket.

    Tip: To create the report definition, in the Application Explorer, right-click the case type and select Create > Reports > Report Definition.
  2. In the Edit columns section, in the Column source and Column name fields, enter the following values. Use the pxWorkbasketAssignments prefix to identify the properties in the Assign-Workbasket class you want to use in the report.

    Column source Column name
    .pyID Case ID
    .pyStatusWork Work Status
    pxWorkbasketAssignments.pxAssignedOperatorID Workbasket ID
    pxWorkbasketAssignments.pxUrgencyAssign Urgency of Assignment
    pxWorkbasketAssignments.pxTaskLabel Task Label
    Note: Selecting one of the three properties with the pxWorkbasketAssignments prefix adds an association rule to the report.

    After you enter the values, the columns look like the following image.

  1. Save your report definition.

2 Create a report that uses a class join in the report definition

  1. In the Onboarding case type, create a report definition named Employee medical selection.
  2. Click the Data Access tab.
  3. In the Class joins section, click Add class join to add a row.
  4. In the Prefix field, enter BE to create a prefix for benefits enrollment cases; use this prefix to reference properties in the Benefits Enrollment class.
  5. In the Class name field, enter TGB-HRApps-Work-BenefitsEnrollment. This is the class to which you want to join the report class.
  6. Keep the default value in the Type field Only include matching rows.
  7. At the end of the row, click Edit conditions to display the Enter filter conditions dialog box.
  8. In the Column field, enter BE.pxCoverInsKey.
  9. In the Relationship field, leave the default value is equal.
  10. In the Value field, enter .pzInsKey. 
    Filter conditions
  11. Click Submit to save your filter condition and close the dialog.
  12. Click the Query tab.
  13. In the Edit columns section, enter the following Column source and Column name values. Use the BE prefix to find properties in the TGB-HRApps-Work-BenefitsEnrollment class you want to use in the report.
    Column source Column name
    .pyID Onboarding Case ID
    .Employee.pyLastName Last Name
    BE.pyStatusWork Benefits Enrollment Work Status
    BE.pyID Benefits Case ID
    BE.MedicalPlan.Name Plan name
    Note: The Employee Medical Selection report references the Case ID (pyID) of two case types (Onboarding & Employee Benefits) but uses the same label of Case ID. A best practice with a report is to eliminate duplicate headers.
  14. Save your report definition.

Confirm your work

  1. To verify your configuration of the report that joins classes referencing an association rule, in the Candiate case type, open the Candidates by workBasket report definition.
  2. In the header of rule form, click Actions > Run to generate the report.
  3. Verify that the report lists the cases, case work status, the workbaskets with which the cases are associated, the current assignments, and assignment urgency. 
    Association rule join sample report
  4. To verify your configuration of the report that uses a class join, in the Onboarding case type, open the  Employee medical selection report definition.
  5. In the header of rule form, click Actions > Run to generate the report. 
  6. Verify that the report includes the case ID and the last name of the employee associated with the Onboarding case type, and lists the case work status of the employee's benefits enrollment case, the case ID, and the selected medical plan name of the joined Benefits Enrollment case type. 

Available in the following mission:

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

Pega Academy 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