Skip to main content



      Home
Home » Archived » BIRT » default value of report parameter(how to get the default value?)
default value of report parameter [message #552499] Thu, 12 August 2010 07:52 Go to next message
Eclipse UserFriend
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 08:09] by Moderator

Re: default value of report parameter [message #552539 is a reply to message #552499] Thu, 12 August 2010 10:51 Go to previous messageGo to next message
Eclipse UserFriend
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 02:49 Go to previous messageGo to next message
Eclipse UserFriend
works Surprised thanks jason
Re: default value of report parameter [message #1703902 is a reply to message #552670] Wed, 05 August 2015 13:19 Go to previous message
Eclipse UserFriend
Hi,

Can you please attach a sample report for the above logic if possible?

[Updated on: Wed, 05 August 2015 13:20] by Moderator

Previous Topic:Birt Report Engine Model as an EMF Model
Next Topic:How to use value from one data set in other data set SQL select.
Goto Forum:
  


Current Time: Thu Jul 24 17:51:39 EDT 2025

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

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

Back to the top