Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » default value of report parameter(how to get the default value?)
default value of report parameter [message #552499] Thu, 12 August 2010 11:52 Go to next message
xoto is currently offline xotoFriend
Messages: 7
Registered: August 2010
Junior Member
hi there,

i want to filter my data with a dynamic report parameter as a combo box. its default value should be "all". If "all" is selected, all of the data should be shown.
It worked using the filter:
row["status"]    Equal to   (params["NewParameter"].value == "all" ? row["status"] : params["NewParameter"].value )


to make it more dynamic i want to replace "all" by the parameters default value. something like
row["status"]    Equal to   (params["NewParameter"].value == params["NewParameter"].defaultValue ? row["status"] : params["NewParameter"].value )


does anybody know how to get the default value?

[Updated on: Thu, 12 August 2010 12:09]

Report message to a moderator

Re: default value of report parameter [message #552539 is a reply to message #552499] Thu, 12 August 2010 14:51 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

You can use this in script or the expression builder to get the default
value of a parameter:
//1stparameter
reportContext.getDesignHandle().getParameters().get(0).getDe faultValue();

Jason

On 8/12/2010 7:52 AM, xoto wrote:
> hi there,
>
> i want to filter my data with a dynamic report parameter. its default
> value should be "all". If "all" is selected, every data should be shown.
> It worked using the filter: row["status"] Equal to
> (params["NewParameter"].value == "all" ? row["status"] :
> params["NewParameter"].value )
>
> to make it more dynamic i want to replace "all" by the parameters
> default value. something like
> row["status"] Equal to (params["NewParameter"].value == "all" ?
> row["status"] : params["NewParameter"].defaultValue )
>
> does anybody know how to get the default value?
Re: default value of report parameter [message #552670 is a reply to message #552499] Fri, 13 August 2010 06:49 Go to previous message
xoto is currently offline xotoFriend
Messages: 7
Registered: August 2010
Junior Member
works Surprised thanks jason
Previous Topic:subtotals for multipage tables
Next Topic:Number formatting in BIRT 2.3.1
Goto Forum:
  


Current Time: Tue Nov 25 21:09:12 GMT 2014

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

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