From bb695cb79a74976d02bcc62370e8c449f7686ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Tak=C3=A1cs?= <93127072+PeterTakacs300@users.noreply.github.com> Date: Fri, 2 Jun 2023 04:57:48 +0200 Subject: [PATCH] IDEMPIERE-5645 - fix NPE on report Script columns (#1871) --- org.adempiere.base/src/org/compiere/print/DataEngine.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.adempiere.base/src/org/compiere/print/DataEngine.java b/org.adempiere.base/src/org/compiere/print/DataEngine.java index 1ad97a7c0d..f03838866d 100644 --- a/org.adempiere.base/src/org/compiere/print/DataEngine.java +++ b/org.adempiere.base/src/org/compiere/print/DataEngine.java @@ -1170,6 +1170,8 @@ public class DataEngine for(PrintDataColumn c : scriptColumns) { pd.setRowIndex(i); 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); Interpreter bsh = new Interpreter(); try {