Solution:
1. Go to SCA machine STAT_HOME\report\csrreports\format and locate the reports rpt_csr_detail.jrxml, dw_rpt_csr_master_global_info.jasper, and rpt_csr_info_sub.jasper and take a backup.
2. Open them with Notepad++ and in the reports order below modify the lines below:
- STAT_HOME\report\csrreports\format\rpt_csr_detail.jrxml, locate the lines below and modify them.
SD_CD like $P{SD_CD}
AND CSR_ID BETWEEN $P{CSR_ID_START} AND $P{CSR_ID_END}
Those should look like:
SD_CD like $P{SD_CD}
<!-- AND CSR_ID BETWEEN $P{CSR_ID_START} AND $P{CSR_ID_END} -->
ORDER BY SD_CD, CSR_ID]]> <-- This is a new line added
- Edit the file dw_rpt_csr_master_global_info.jasper modifying the order by as below:
ORDER BY CSR_GLOBAL_INFO.CSR_ID, CSR_GLOBAL_INFO.DESC_TYPE DESC]]>
- Edit the file rpt_csr_info_sub.jasper in the same way:
ORDER BY SD_CD, CSR_ID]]>
3. Delete the .jasper files for the same reports if exist.
Please Note, modifying the defaulted Stat reports is not supported but in this case, it should work.