RSA Identity Governance & Lifecycle display order and value of report column changes automatically
2 years ago
Originally Published: 2018-04-04
Article Number
000041954
Applies To
RSA Product Set: Identity Governance & Lifecycle
RSA Product/Service Type: Software Appliance
RSA Version/Condition: 7.0.2 
 
Issue
The display order of the columns marked under Reports > Chart > Columns tab changes on its own when saving the report.  Changes are seen in the count of the column records when the display order changes.  However, when they use the Preview button correct records are shown.

The query below is used to create the report:
 
(SELECT
(
'Active accounts' ) AS "Active Accounts",
(
SELECT COUNT(*) FROM avuser.PV_ACCOUNT pa
LEFT JOIN avuser.PV_USER_ACCOUNT_MAPPING pum
ON pa.ID=pum.ACCOUNT_ID
LEFT JOIN avuser.PV_USERS pu
ON pum.USER_ID = pu.ID
LEFT JOIN avuser.PV_BUSINESS_SOURCE pbs 
ON pa.APPLICATION_ID = pbs.ID
WHERE pa.IS_DISABLED =0
AND pa.DELETION_DATE IS NULL
AND pu.IS_TERMINATED ='False'
AND (pbs.RESOURCE_TYPE = 'A' 
OR pbs.RESOURCE_TYPE = 'D' )
) AS "Active_linked_active ",
(
SELECT COUNT(*) FROM avuser.PV_ACCOUNT pa
LEFT JOIN avuser.PV_USER_ACCOUNT_MAPPING pum
ON pa.ID=pum.ACCOUNT_ID
LEFT JOIN avuser.PV_USERS pu
ON pum.USER_ID = pu.ID
LEFT JOIN avuser.PV_BUSINESS_SOURCE pbs 
ON pa.APPLICATION_ID = pbs.ID
WHERE pa.IS_DISABLED =0
AND pa.DELETION_DATE IS NULL
AND pu.IS_TERMINATED ='True'
AND (pbs.RESOURCE_TYPE = 'A' 
OR pbs.RESOURCE_TYPE = 'D' )
) AS "Active_linked_term ",
(
SELECT COUNT(*) FROM avuser.PV_ACCOUNT pa
LEFT JOIN avuser.PV_BUSINESS_SOURCE pbs 
ON pa.APPLICATION_ID = pbs.ID
WHERE pa.ORPHANED_DATE IS NOT NULL
AND pa.IS_DISABLED =0
AND pa.DELETION_DATE IS NULL
AND (pbs.RESOURCE_TYPE = 'A' 
OR pbs.RESOURCE_TYPE = 'D' )
) AS "Orphan Account"
 FROM dual)

The correct order of the columns set by the user when creating/editing the report is as follows:
 
User-added image

The output of the query when previewed:
 
User-added image

After saving the report, the column order changes on its own as shown below:
 
User-added image
Incorrect output of the chart after the disorder of the columns:
 
User-added image
Cause
The report query had quoted aliases with trailing space which was causing incorrect results and change in the order of the columns.
 
User-added image
Resolution
Remove the extra spaces in the alias name or any other provided fields in the SQL query used in the report and save it.
 
User-added image

The extra blank space on the provided field names would be tricky to handle by the current code base, as it would require RSA Identity Governance & Lifecycle code to do query parsing and require a lot of efforts to be changes in the product logic.

​Hence, the Report Query Developer should make sure that there are no extra spaces in any of the field names.