Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Report Parameter values size
Report Parameter values size [message #869301] Thu, 03 May 2012 07:47 Go to next message
mkrivic Mising name is currently offline mkrivic Mising nameFriend
Messages: 33
Registered: May 2010
Member
Hi,

Is there possible to get an array of BIRT report parameter values?
Also, is there possible to manage with default values in BIRT?

For example, if I have a parameter with months from 01 to 12 values, can I make some of the values to be default when I want?
Example: it's May month current, and I would like to set parameter value 05 to be default...

Hope you understood me.

Regards,
Re: Report Parameter values size [message #869677 is a reply to message #869301] Thu, 03 May 2012 16:58 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Sure just use a getDefaultValueList script on the parameter. For
example assume I have a scripted dataset that returns an integer 1-12
that represent months. I then tie a multi-select parameter to this data
set and put the following default values script in:

var dSLArray = [];


importPackage( Packages.java.util );
cal = Calendar.getInstance();
tmonth = cal.get(Calendar.MONTH) +1;

dSLArray[0]= tmonth-1;
dSLArray[1]= tmonth;
dSLArray[2]= tmonth+1;
dSLArray;


This will set the default values for the parameter to be current month -
1, current month, and current month +1

See attached example.

Jason

On 5/3/2012 3:47 AM, mkrivic Mising name wrote:
> Hi,
>
> Is there possible to get an array of BIRT report parameter values?
> Also, is there possible to manage with default values in BIRT?
>
> For example, if I have a parameter with months from 01 to 12 values, can
> I make some of the values to be default when I want?
> Example: it's May month current, and I would like to set parameter value
> 05 to be default...
>
> Hope you understood me.
>
> Regards,
Previous Topic:Parse data into second Data Set
Next Topic:BIRT not able to use TypeFace when creating styles
Goto Forum:
  


Current Time: Sun Feb 23 21:15:51 GMT 2020

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

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

Back to the top