Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » testing for null parameter resulting in crash
testing for null parameter resulting in crash [message #1201721] Thu, 21 November 2013 22:09 Go to next message
Gibran Shah is currently offline Gibran ShahFriend
Messages: 33
Registered: September 2013
Member
Hello,

I created a report parameter that could be left blank. It shows up with a check mark beside it that says "no value". I leave it blank and check "no value", and then try to test whether nor not it's null in the script:

if (params["myParam"] == null)
{
print("myParam is null");
}
else
{
print("myParam is not null");
}

But instead of printing out a message, it crashes.

I know my print() function works. I've been using it for months. If even checking the parameter for a null value causes it to crash, how can I test for a null value?
Re: testing for null parameter resulting in crash [message #1219381 is a reply to message #1201721] Tue, 03 December 2013 15:20 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Checking it for null with if(params["myparam"] == null) works in the latest version (4.3.1). What is your version?

Michael

Developer Evangelist, Silanis
Previous Topic:compare year
Next Topic:Space between tables in Birt for PDF
Goto Forum:
  


Current Time: Sat Apr 27 00:34:44 GMT 2024

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

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

Back to the top