IDEMPIERE-5645 - fix NPE on report Script columns (#1871)

This commit is contained in:
Peter Takács 2023-06-02 04:57:48 +02:00 committed by GitHub
parent 66e0d4200e
commit bb695cb79a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1170,6 +1170,8 @@ public class DataEngine
for(PrintDataColumn c : scriptColumns) { for(PrintDataColumn c : scriptColumns) {
pd.setRowIndex(i); pd.setRowIndex(i);
PrintDataElement e = (PrintDataElement) pd.getNodeByPrintFormatItemId(c.getAD_PrintFormatItem_ID()); PrintDataElement e = (PrintDataElement) pd.getNodeByPrintFormatItemId(c.getAD_PrintFormatItem_ID());
if(e == null) // primarily on grouping rows, if no functions are assigned to the script column
continue;
Object value = parseVariable(e.getValueAsString().replace("@SCRIPT", ""), c, pd); Object value = parseVariable(e.getValueAsString().replace("@SCRIPT", ""), c, pd);
Interpreter bsh = new Interpreter(); Interpreter bsh = new Interpreter();
try { try {