Back Forward Report wizard customization — How to categorize properties into custom categories

Advanced featureIn both the Criteria and Fields steps of the Report Wizard, the user is asked to select properties that affect the report output. When the report data source (selected in the DataSource step) has dozens or more fields — counting those properties inherited from ancestor classes — this can be challenging. GRP-923 5.5

Optionally, your application can present properties in the Criteria and Fields steps that are grouped into custom categories that may structure and simplify the selection process for Report Wizard users.

Example

Categories By default, the Criteria step shows properties in four categories:

(For the Criteria step, only properties that are exposed as database columns appear.) If your application contains information about corporate financial results (assets and liabilities), there may be dozens of numeric properties, each with a unique name and Short Description, but difficult to tell apart.

You can provide additional property categories meaningful to your application users such as Assets or Liabilities.

Procedure

  1. Create a field value rule with Rule-Obj-Report- as the Applies To key part, pyPropertyCategory as the second key part, and a short phrase such as Asset Fields as the final key part, a category name. Repeat for each category you want to define.
  2. Open the standard decision tree rule Rule-Obj-Report-.getPropertyCategoryVisibility. Override this rule in an application RuleSet version, preserving the exact rule name.
  3. Modify your copy of the decision tree rule to include those categories you defined above in step 1 (and exclude, if you want, some of the existing categories). This change to the decision tree rule makes your new categories visible. (The category DataSource corresponds to "ZZZZZZ only" — properties in the exact class specified as the Applies To class of the report.)
  4. Next, alter the activity that controls which properties appear in which category. Open the standard application rule Rule-Obj-Report-.CustomizeDisplayProperties. Override this rule in an application RuleSet version, preserving the exact rule name. This activity creates a Code-Pega-List page containing four facts about properties on each embedded pxResults page: pyPropertyName, pyLabel, pyStringType, and pyClassName.
  5. Update the activity to create additional pxResults pages identifying these four facts about the properties that you want to be members of the category. For example, your updated activity could create each additional pxResults() page explicitly, one at a time, using a Page-New method followed by a Property-Set method. Or, if the property names or descriptions that belong to a category follow a naming convention, your activity can filter the properties to form the list.
  6. Save the decision tree rule and activity. Test. On the Criteria step, confirm that the new categories appear with the expected properties (that are exposed as individual database properties). On the Fields step, confirm that the new categories and properties appear as expected.

Note

The customizations described here affect only the Report Wizard experience. They do not alter the contents of a list view or summary view rule created with the Report Wizard.

UpAbout the Report wizard