Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

TreeGrid does not show all columns of report with 'SUM' function

SA-5788

Summary



Configure a report definition with 'SUM' function applied on one of the columns included. Following two problems are noticed while configuring a tree grid with this report definition as the data source: 

a) When user drags and drops this report definition inside a section, the following exception is shown in pop-up: "Exception when trying to execute dropOnSectionFromExternal". 

b) To use the same report definition as a tree grid, user drags a tree grid layout from layout panel and drops in section. Now, this tree grid layout can be configured to use the same report definition on which drag did not worked. Save the section and perform a 'Preview'. It is noticed that the columns in repeat definition which are configured after the column having 'SUM' function, are not displayed as tree grid columns. 


Error Messages



Exception when trying to execute dropOnSectionFromExternal.

Steps to Reproduce



1) Create a report definition with 'SUM' function applied on one of the columns. 
2) To check first problem, try to drag and drop the report definition inside a section. 
3) To check second problem, drag a tree grid layout from layout panel and drop in section. Now, this tree grid layout can be configured to use the same report definition on which drag did not worked. Save the section and perform a 'Preview'. 


Root Cause



Drag and drop does not work if the report definition has SUM/MIN/MAX/AVG function applied on even a single column. If we change the function to ‘Count’, drag and drop starts working. Also, the columns configured after the column with ‘SUM’ function are not displayed as tree grid columns. So, if report definition has only one column on which ‘SUM’ function is applied and we make this column as last in report definition, at run time, we could see all the columns are shown properly. So basically, it is unable to display any columns which are configured after the column on which ‘SUM’ was applied.

Code changes are in "populateSummaryReportColumns" method defined in "pzpega_ud_section.js" 

current code:- 
var columnDataType = (aggregateFunction == "COUNT" || aggregateFunction == "COUNTDISTINCT" ) ? "Integer" : summaryColumns[i - 2].selectSingleNode("pyColumnDataType").text; 

Above statement changes to:-
var columnDataType = (aggregateFunction == "COUNT" || aggregateFunction == "COUNTDISTINCT" || (! summaryColumns[i - 2].selectSingleNode("pyColumnDataType") ) ) ? "Integer" : summaryColumns[i - 2].selectSingleNode("pyColumnDataType").text;



Resolution



The changes need to be made in pzpega_ud_section JavaScript; this is a final rule. The issue is planned to be targeted in upcoming Pega 7.1.8 release.

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us