Columns / ReportColumnConfig: Report Grid Presentation

The <ReportColumnConfig> elements within the <Columns> element specify which values should be returned from the query and also define how those values are presented in the report grid.

Copy
<Columns>
<ReportColumnConfig field="username" header="rept_uncorrelated_ids_grid_username" property="nativeIdentity" sortable="true" />

<ReportColumnConfig field="firstName" header="rept_uncorrelated_ids_grid_firstName" property="identity.firstname" sortable="true" />

<ReportColumnConfig field="lastName" header="rept_uncorrelated_ids_grid_lastName" property="identity.lastname" sortable="true" />

<ReportColumnConfig field="applicationName" header="rept_uncorrelated_ids_grid_appName" property="application.name" sortable="true" />
 </Columns>

Attributes of ReportColumnConfig include:

Attribute

Usage

field

Unique name for the report column in this report

header

Column label to use in the report body; can be a string or a localizable message key

property

Object property from which the data is pulled; this value is used in the query specification

sortable

Boolean value indicating whether the report body should be sortable by this column; determines whether the column is selectable in the Sort By and Group By fields in the report specification and whether the report can be sorted by this column in preview mode

hidden

Boolean value indicating whether the column should be omitted from the report grid by default. Columns marked as hidden (hidden="true") appear in the left-side of the Columns list on the report template's Report Layout page, which makes them available for inclusion. However, by default they are not included on the report. Any report instances that were configured to display these fields in the report grid override this hidden attribute by including the column name in their reportColumnOrder attribute, causing the column to appear in the report output regardless of this attribute's value.

ifEmpty

Optional property to use if the value of the object property is null or empty;See Entitlement Owner Access Review Live Report's accountName field for an example:

<ReportColumnConfig field="accountName" header="rept_data_owner_col_account_name" ifEmpty="exceptionEntitlements.nativeIdentity" property="exceptionEntitlements.displayName" sortable="true" width="110"/>

subQueryKey

Used for multi-valued properties to show the values as a list of comma-separated values instead of multiple rows in the report. Specifying a subQueryKey automatically renders the column as a subquery that selects the property from the dataSource objectType matching on the subsQueryKey attribute.An example exists in the Manager Access Review Live Report's tags field:

<ReportColumnConfig field="tags" header="rept_cert_col_tags" property="parent.certification.tags.name" subQueryKey="id" width="110"/>

sortExpression

A set of fields by which the data should be sorted instead of sorting by the selected column. This attribute allows a column that is not sortable to sort the data by columns related to the selected column.
See the following example of the permission column on the Account Group Permissions Access Review Live Report.

<ReportColumnConfig field="permissions" header="rept_cert_col_account_group_permission" property="exceptionEntitlements"sortExpression="exceptionApplication,exceptionPermissionTarget,exceptionPermissionRight" sortable="true" width="110">
<RenderScript>
<Source>
return sailpoint.api.EntitlementDescriber.summarize(value);
</Source>
</RenderScript>
</ReportColumnConfig>

scriptArguments

A CSV list of additional properties to pass to a column's RenderScript; see the status field from the Policy Violation Report for an example. The renderScript then accesses these values through its scriptArgs variable (as shown in this example).

<ReportColumnConfig field="status" header="rept_viol_grid_col_status" property="status" scriptArguments="identity,policyName,constraintName,created" sortable="true" width="110">
<RenderScript>
<Source>
import sailpoint.object.*;

String identityId = scriptArgs.get("identity").id;

</Source>
</RenderScript>

valueClass

Defines the class for the property so it can be displayed appropriately; omitted for string values

skipLocalization

Indicate that the column contains reserved words that should not be translated. Examples include Names or Account names that could contain reserved keywords.

In the standard reports, the only time the "hidden" attribute is used on a ReportColumnConfig is when the column is added to the available set by an ExtendedColumnScript or ExtendedColumnRule (as described in Extended Column Script or Rule). Generally, if a column is relevant to a report, it is displayed on the report by default, though it can be removed from the detail grid by a user if they do not wish to see that data on their customized version of the report.

Strings and Java constants specified in ReportColumnConfig attributes are evaluated first as message keys for automatic localization; if they do not match a defined message key, the given string value is used.

RenderScript and RenderRule

If the value returned from the query needs to be manipulated into a more user-friendly format for display on the report, this can be accomplished with a RenderScript or RenderRule. A RenderRule is used to encapsulate the beanshell into a reusable rule - useful when the same manipulation might apply to several reports. A RenderScript specifies the beanshell inline within a <Source> element. The column's property attribute is passed into the script in the variable "value."

This example RenderScript (taken from the Revocation Live Report) displays a different localized message key depending on whether the action.remediationCompleted flag is true or false so that the report column shows an easier-to-interpret "Status" instead of a True / False flag.

Copy
<ReportColumnConfig field="status" header="rept_remediation_progress_grid_col_status" property="action.remediationCompleted" sortable="true" width="110">
   <RenderScript>
   
      <Source>
      
         import sailpoint.tools.Message;
         
         import sailpoint.web.messages.MessageKeys;
         
         return value == true ? Message.localize(MessageKeys.WORK_ITEM_STATE_FINISHED) : Message.localize(MessageKeys.WORK_ITEM_STATE_OPEN);
     
     </Source>
     
         </RenderScript>
</ReportColumnConfig>

A RenderRule would be specified like this:

Rendered columns are sorted by the property attribute, not by the displayed value, so the order of rows might not appear alphabetical by the display value. At a minimum, sorting by the column groups all of the rows with the same column value together. Some properties might not be sortable, such as a property that is an object. These columns should be marked as sortable="false" even though the displayed value might seem sortable. Alternatively, a sortExpression can be specified to drive data sorting for these columns.

Copy
<ReportColumnConfig field="status" header="rept_remediation_progress_grid_col_status" property="action.remediationCompleted" sortable="true" width="110">
   <RenderRule>
      <Reference class="sailpoint.object.Rule" id="4028460238ed9b8e0138ed9bf61300de" name="Status Message RenderRule"/>
   </RenderRule>
</ReportColumnConfig>