Question
Accenture
GB
Last activity: 8 Jul 2022 3:24 EDT
How to Wrap the column Data in Report definition (Pega 8.7.0)
Hi,
Greetings. Hope you are all doing well! I have a very long text/paragraph that is shown in a report definition, User has option to export this to excel via Actions, however as the text is too long and there is no wrap, User has to scroll right to get to the Actions Menu, I am aware of a custom control to wrap the text, but just wondering if you have any similar requirement and what were the solutions thought out to achieve this. I am on Pega 8.7.x
Regards,
Bharat
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 8 Jul 2022 3:19 EDT
Lventur
IN
In Report Definition respective column - right side you will be having a gear icon. Click that gear icon and select the text area as column format and in column width field you could provide your needed pixel information. Based on this automatically in report definition results will get wrap.. Attached screen-shot for reference.
Accenture
GB
@Gunasekaran Baskaran Thank you, this worked, do you know if we export the results, is there any way to retain the column format within excel?
Regards,
Bharat
Lventur
IN
Yes, during export also the same wrap format should get applied..
Accenture
GB
@Gunasekaran Baskaran Thank you, but we have only one column format, i do not see another place where i can include this control when exporting. I am using OOTB Actions menu from Report Definition to export the results to excel.
Regards,
Bharat
Lventur
IN
As far I know, we will not be able to control (or) change excel generation feature which we are having under report definition action menu.
Text Area control will help us to view the data in wrap format but during export that is getting removed. I am not sure by using OOTB features we will be able to achieve that..
-
Srinivas Bharat Komarina
Accenture
GB
@BhanuPrakash_G Hi, Greetings. ellipsis is that a control which i can use for a column in Report Definition?
Regards,
Bharat
Accenture
GB
@BhanuPrakash_G Thank you, when i export the results to excel, i see the text with Ellipsis and not the full text, client wants to see full text for the column when exported.
Regards,
Bharat
JPMC
IN
@KOMARINA can try this code
<pega:choose> <pega:when test="Param.exportmode=''"> <%String str = tools.getActiveValue(); int CharLength=20; String strValue=null; strValue=(str.length() > CharLength) ? str.substring(0,CharLength)+"..." : str; %> <%=StringUtils.crossScriptingFilter(strValue)%> </pega:when> <pega:otherwise> <%=tools.getActiveValue()%> </pega:otherwise> </pega:choose>