Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Is it possible to check if parameter allows null at rendering time?
Is it possible to check if parameter allows null at rendering time? [message #827530] Fri, 23 March 2012 13:06 Go to next message
Alexey Romanov is currently offline Alexey Romanov
Messages: 263
Registered: May 2010
Senior Member
I want to show a checkbox in a report if a certain parameter allows null values. From IGetParameterDefinitionTask I can get IParameterDefnBase or ParameterHandle, but neither seems to include the data I need. Is there a way to access it?
Re: Is it possible to check if parameter allows null at rendering time? [message #827539 is a reply to message #827530] Fri, 23 March 2012 13:23 Go to previous messageGo to next message
Alexey Romanov is currently offline Alexey Romanov
Messages: 263
Registered: May 2010
Senior Member
Oh right, I can just check if IParameterDefnBase is an IScalarParameterDefn and cast it. But why is IScalarParameterDefn.allowNull() deprecated?
Re: Is it possible to check if parameter allows null at rendering time? [message #827762 is a reply to message #827539] Fri, 23 March 2012 19:07 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I believe it was deprecated in favor of using:

* @return whether the parameter is required.<br>
* the rule for String type is:
* <li>isRequired=true, allowNull and allowBlank are false</li>
* <li>isRequired=false, allowNull and allowBlank are true</li>
* <br>
* for other type like integer:
* <li>isRequired=true, allowNull and allowBlank are false</li>
* <li>isRequired=false, allowNull and allowBlank are true</li>
*/
boolean isRequired( );

Jason

On 3/23/2012 9:23 AM, Alexey Romanov wrote:
> Oh right, I can just check if IParameterDefnBase is an
> IScalarParameterDefn and cast it. But why is
> IScalarParameterDefn.allowNull() deprecated?
Re: Is it possible to check if parameter allows null at rendering time? [message #827811 is a reply to message #827762] Fri, 23 March 2012 20:38 Go to previous message
Alexey Romanov is currently offline Alexey Romanov
Messages: 263
Registered: May 2010
Senior Member
I thought there were 3 different checkboxes for "allow null", "allow blank" and "is required" in parameter editor. Will need to recheck after the weekend.
Previous Topic:Data Sets and SQL Views
Next Topic:Hide empty yaxix series legend
Goto Forum:
  


Current Time: Sat Oct 25 01:42:02 GMT 2014

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

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