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.
Close popover

Customize the lists of properties and calculations available in the Report Editor

Data Explorer default viewIn Pega 7, you can customize the lists of properties and calculations that appear in the Data Explorer of the Report Editor for reports in a given class.

Application case types may have large data models with many properties. By default, the Data Explorer shows only Best Bet properties — those most frequently used in existing reports — but even this list may be long (as in the screenshot at right) and potentially confusing to end users who are not familiar with the application’s data model and do not have access to a usable Data Dictionary.

With the procedures described in this article, developers can limit the properties and calculations shown to non-developers in the Data Explorer to shorter, customized lists which will simpler for end users to use.

Specifying a custom list of properties or calculations following these procedures, using a data transform rule, only limits the entries in the Data Explorer for reports in the class of the data transform rule, and classes that inherit from that class.
Non-developers, such as business analysts, who are familiar with the application data model can still access other properties using the search box in the Data Explorer. They cannot, however, find and use calculations not included in the customized Calculations list.

Customize the Data Explorer properties list

By default, properties appear in the Data Explorer on the Best Bets and All Matches tabs, as in the image above.

  1. Log in to PRPC using an account with developer permissions.
  2. Locate the class on which the report for which you want to customize the Data Explorer is created, or the class for which you want to create a new report with a customized Data Explorer.
  3. In that class create a new data transform: Right-click the class and select on New > Data Model > Data Transform. Name the data-transform pyReportEditorProperties; this name is required for the customization.
  4. In the data transform, in the Pages and Classes tab, include pgAvailableProperties in the class Code-Pega-List.
  5. On the Definition tab, in the first row, select "Update Page" in the Action column and set the target as pgAvailableProperties.
  6. In the nested row, set the Action to "Append and Map to" and set the target as pgAvailableProperties.pxResults.
  7. In the nested row below that, set the Action to "Set" and the Target to .pyClassName as "equal to" the class for the report. Your screen should look like this:
    data transform Definition tab
  8. Right-click the "Set" action (the third line in the image above) and select "Add sibling below". In the new line, set the Action as "Append and Map to" and set the Target to.pxResults.
  9. In the nested row below that, set the Action as "Set" and set the Target to .pyPropertyName as "equal to" any property you want to include in the list in the Data Explorer; for example, pyDeadLine. Make sure the property is in the primary class, and that it is spelled and with upper and lower case exactly as the name of the property is.
  10. Repeat steps 8 and 9 for each property you want to add. In this example, we're adding pyChargeTo, pyCustomer, and pyReopenCount.
  11. Insert as the first step a new line. Set its Action to "Remove" and its Target to pgAvailableProperties. The data transform should now look like this:
    data transform Definition tab with additional rows included

Save the data transform. When you next open a report for that class in the Report Editor, the Data Explorer shows a much shorter and more manageable list in the Available Columns tab:

]customized list in data explorer

When the system checks the data transform, it also checks for data transforms of the same name in the classes the report's class is derived from. If it encounters other data transforms of the same name, it also includes in the Available Columns tab the properties specified in those data transforms.

Return to top

Add embedded properties to the list

To add embedded properties to the list, modify the data transform you created in the previous section with these additional steps:

  1. Right-click any property you have already added and select "Add Sibling Below".
  2. In the new row that appears, set the Action to "Append and Map To" and the Target to .pxResults.
  3. In the nested row below that, set the Action to "Set" and the Target to .pyPropertyName "equal to" the top-level property in which the embedded property you want is included. In this example, it is pyWorkParty.
  4. Right-click the "Set" step you just created and select "Add Sibling Below".
  5. In the new row that appears, set the Action to "Append and Map To" and the Target to .pxResults.
  6. In the nested row below that, set the Action to "Set" and the Target to .pyPropertyName "equal to" the embedded property you want. In this example, it is pyPartyIdentifier.
       At this point, the embedded property is a page-list property.
  7. To change the embedded property to an indexed property, right-click the row you created in step 6 and select "Add Sibling Above".
  8. In the new row that appears, set the Action to "Set" and the Target to .pyBaseClass "equal to" PartyURI, as in the image below:

adding embedded properties via the data transform

Save the data transform. When you next open a report for that class in the Report Editor, the display in the Available Columns tab includes the embedded property Party ID:

available columns list includes embedded property

Return to top

Add properties from associations and joined classes

If your Report Definition has associations and joined classes, you can include properties from them in the display in the Data Explorer by adding a "+ More" link. When users click the link they can expand the list.

  1. Right-click the last "Append and Map to" step in the data transform you created above and select "Add Sibling Above".
  2. In the new row that appears, set Action to "Update page" and the Target to MorePage.
  3. In the embedded row, set the Action to "Set" and the Target to .pyPropertyName "equal to" More, as in the image below:
    Adding properties from joins or associations
  4. Right-click the last step and select "Add Sibling Below".
  5. In the row that appears, set the Action to "Append To" and the Target to "pxResults(2)" (you must enter this manually, not select it).
  6. In the "relation" field next to where you entered "pxResults(2)", select "an existing page". In the source column select MorePage:
    Adding the 'more' link

Save the data transform. When you next open a report for that class in the Report Editor, the display in the Available Columns tab includes the embedded "+ More" link:

customized Data Explorer

Return to top

Customize the Calculations tab

Calculations tab in Data ExplorerThe Calculations tab in the Data Explorer displays by default all the SQL functions available in all circumstances for all reports, as in the image at right. For any given report, only a minority of the SQL functions are relevant. In a process similar to that outlined above, you can customize the list of SQL functions to provide only those that are relevant to the current report.

To customize the list, follow a procedure similar to that described for customizing the properties list:

  1. Log in to PRPC using an account with developer permissions.
  2. Locate the class on which the report for which you want to customize the Data Explorer is created, or the class for which you want to create a new report with a customized Data Explorer.
  3. In that class, create a new data transform: Right-click the class and select New > Data Model > Data Transform. Name the data-transform pyReportEditorFunctions; this name is required for the customization.
  4. In the data transform, in the Pages and Classes tab, include the following pages with their classes as indicated:
    • pgAliasFunctions - Code-Pega-List
    • ResultsPage - Rule-Alias-Function
  5. On the Definition tab, in the first row, set the Action to "Update Page" and the Target to ResultsPage (the page assigned to Rule-Alias-Function above).
  6. In the nested row, set the Action to "Update Page" and the Target to .pyRuleName "equal to" a defined alias function you want to include in the list, such as pxLength.
    data transform to customize report editor calculation list
  7. Right-click "Update Page" and select "Add Sibling Below".
  8. In the new row, set the Action to "Update Page" and the Target to pgAliasFunctions (the page assigned to Code-Pega-List above).
  9. In the nested row, set the Action to "Append to" and the Target to pxResults. In the relation field to the right of the Target, select "an existing page" and select ResultsPage as the source.
    Adding an alias

If you save the data transform at this point, it populates the list in the Calculations tab of the Data Explorer with a single alias function, which in this case is "Length". Repeat from step 5 for each function you wish to include.

The image below shows the Calculation tab list that results from deploying a data transform that adds to the list a small and relevant number of calculations:

customized calculations tab

When the system checks the data transform, it also checks for data transforms of the same name in the classes the report's class is derived from. If it encounters other data transforms of the same name, it also includes in the Calculations tab the properties specified in those data transforms.

 

Return to top

Have a question? Get answers now.

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