Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » onCreate error(onCreate error)
onCreate error [message #1831668] Wed, 26 August 2020 09:42 Go to next message
Tzipora Mualem is currently offline Tzipora MualemFriend
Messages: 1
Registered: August 2020
Junior Member
I have two images that I want to display according to a value from the dataset/dynamic text in the report. I am getting errors when trying to do it.

if(this.getRowData().getExpressionValue("row[price]") == "$30" )
this.imageName = "check.JPG";
else
this.imageName = "unchecked.JPG";
The error:

org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "if(this.getRowData().getExpressionValue("row[price]") == "$30" ) this.imageName = "check.JPG"; else this.imageName = "unchecked.JPG";": TypeError: Cannot call method "getExpressionValue" of null (/report/body/image[@id="84"]/method[@name="onCreate"]#1)
Re: onCreate error [message #1833955 is a reply to message #1831668] Wed, 28 October 2020 19:17 Go to previous message
rbaak Mising name is currently offline rbaak Mising nameFriend
Messages: 31
Registered: July 2009
Member
The error you are getting is because you have null values in your dataset. You should check for nulls in your if statement first, then check for your price.

Previous Topic:Date parameter not working Date=any date
Next Topic:New Page Output per unique ID/Column
Goto Forum:
  


Current Time: Mon Apr 29 05:36:19 GMT 2024

Powered by FUDForum. Page generated in 0.02450 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top