Project: Birt
Bug 220148 NPE when preview dataset with params["xx"].getFullYear computed column
Reported: 2008-02-25 04:03:26 | Status: closed fixed

Description: NPE when preview dataset with params["xx"].getFullYear computed column Build number: 2.3.0.v20080225-0800 Steps to reproduce: 1, New a report parameter p1 and type is datatime 2, New a dataset and create a computed column with expression params["xxx"].getFullYear() 3, Preview the dataset Expected result: The preview should be ok Actual result: NPE throws out Error log: org.eclipse.birt.report.designer.core.runtime.GUIException: Caused by java.lang.NullPointerException. at org.eclipse.birt.report.designer.core.runtime.GUIException.createGUIException(GUIException.java:78) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:169) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:150) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:89) at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage.updateResultSetTableUI(ResultSetPreviewPage.java:521) at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage.runUpdateResults(ResultSetPreviewPage.java:277) at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage.access$1(ResultSetPreviewPage.java:239) at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage$4.runInUIThread(ResultSetPreviewPage.java:232)

Files changed in fix:
data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/script/ReportParameter.java