Question6Replies944Views _DmitryK7052 Member since 2016 14 posts Philips Posted: August 19, 2016Last activity: August 23, 2016 Closed Solved How to use LISTAGG function in Report Definition?Hi all,I've worte following user function:Add it to my Report Definition:Now that RD generate following SQL code:SELECT LISTAGG("PC0".TEAMMEMBERNAME, ',') WITHIN GROUP (ORDER BY "PC0".TEAMMEMBERNAME) AS "pyTextValue(1)", "PC0".CASEID FROM PRPC.MYORDERS_TEAMMEMBERS "PC0";And it executes with error:ORA-00937: not a single-group group functionYes, this right, this function will not work without group by statement at the end of sql query:SELECT LISTAGG("PC0".TEAMMEMBERNAME, ',') WITHIN GROUP (ORDER BY "PC0".TEAMMEMBERNAME) AS "pyTextValue(1)", "PC0".CASEID FROM PRPC.MYORDERS_TEAMMEMBERS "PC0" GROUP BY CASEID;Question: how to add this "GROUP BY CASEID" in Report Defenition? Data Integration Reporting ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Moderation Team has archived post This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question. Posted: 4 years agorodrg PEGA replied to _DmitryK7052Hi Dmitry, Normally, to do a "group by" we add a Summarized column such as COUNT pyID. The content (input parameters, presentation and source) of the user function is not clear for me to recreate a similar function at my end. Could you please upload / attach a better resolution of the first screenshot? Thanks, Gisela Posted: 4 years agoHabeebBaig PEGA replied to _DmitryK7052Hi Dimitry, From screenshots I believe you are using 7.1.x or above, try using 'Grouping' option in 'Report Viewer' tab of your report defintion. Thanks, Habeeb Baig Posted: 4 years agoHabeebBaig PEGA replied to _DmitryK7052Adding screenshot here (PFA) Accepted Solution Posted: 4 years agonistr PEGA replied to _DmitryK7052Since LISTAGG is an aggregate function, it cannot be done with SQL function using the Rule-Alias-Function. Please raise an enhancement request if you need support for this. Posted: 4 years ago_DmitryK7052 Philips replied to nistrAnd how to rise an enhancement request? Posted: 4 years agoUpdated: 4 years agoLochan_DV MOD replied to _DmitryK7052Hello Dmitry, An enhancement request has been created on our internal portal. The request ID is attached to your post above (under Related Support Case number field.) Please refer this number to your Account Executive to track the status. Regards, Lochan | Community Moderator | Pegasystems Inc.