Skip to main content

Creating reports that combine data from multiple classes

2 Tasks

30 mins

Visible to: All users
Intermediate Pega Platform '23 Reporting English


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 pega123!
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.

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Challenge Walkthrough

Detailed Tasks

1 Create a report that joins classes referencing an association Rule

  1. In the Pega instance for the challenge, enter the following credentials:
    1. In the User name field, enter SSA@TGB.
    2. In the Password field, enter pega123!.
  2. 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.
  3. 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 Value field, enter .pzInsKey. 
    Filter conditions
  10. Click Submit to save your filter Condition and close the dialog.
  11. Click the Query tab.
  12. 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 column names.
  13. 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. 

This Challenge is to practice what you learned in the following Module:

Available in the following mission:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

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