[#13841] - Evaluation Time in Lists causes NullPointerException

Category:
Bug report
Priority:
High
Status:
New
Project: Severity:
Critical
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

Using some Evaluation Time different to "now" (like "band") at Text Fields in List elements always causes a NullPointerException at runtime (independent of actual expression).

java.lang.NullPointerException
at net.sf.jasperreports.engine.fill.DelayedFillActions.addDelayedAction(DelayedFillActions.java:196)
at net.sf.jasperreports.engine.fill.DelayedFillActions.addDelayedAction(DelayedFillActions.java:150)
at net.sf.jasperreports.engine.fill.BaseReportFiller.addBoundElement(BaseReportFiller.java:802)
at net.sf.jasperreports.engine.fill.JRBaseFiller.addBoundElement(JRBaseFiller.java:1539)
at net.sf.jasperreports.engine.fill.JRBaseFiller.addBoundElement(JRBaseFiller.java:1530)
at net.sf.jasperreports.engine.fill.JRFillTextField.fill(JRFillTextField.java:924)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.fillElements(JRFillElementContainer.java:1040)
at net.sf.jasperreports.components.list.VerticalFillList.fillContents(VerticalFillList.java:166)
at net.sf.jasperreports.components.list.VerticalFillList.prepare(VerticalFillList.java:111)
at net.sf.jasperreports.engine.fill.JRFillComponentElement.prepare(JRFillComponentElement.java:152)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:542)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:453)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:428)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:327)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:258)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:110)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:621)
at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:135)
at java.base/java.lang.Thread.run(Thread.java:834)

The same setup with a Table element works as expected, so this is currently a workaround.

Simple example report is attached.

Some background info: The return value (like a sum) of a nested List in List should be displayed at the next higher level. Using default evaluation time "now" leads only to "null" being displayed. Evaluation type "band" should display the correct value after nested list is completed. Works as intended with subreports or table elements.

AttachmentSize
Binary Data evaluationtimeexception.jrxml3.19 KB
v6
List
oh's picture
oh
5
Joined: Sep 6 2016 - 2:52am
Last seen: 6 days 15 hours ago
Feedback
randomness