Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Dynamic Listbox Default Parameters
Lianite
I have a listbox of dates that is dynamically populated from our database, but I need to be able to set a default for the parameter of the current date, or the maximum date in the database.
How do I go about doing this?
This will be held in a cascading parameter as the second element.
Thank you,
Jordan Trulen
Find more posts tagged with
Comments
mwilliams
Hi Jordan,
What version of BIRT are you using? Newer versions of BIRT have an expression builder for the default value of parameters, so you could easily grab today's date as the default. You could also set that parameter to "not required". If the user doesn't pick a value, you could just use today's date in script to limit your dataSet. Let me know if this doesn't help!
Lianite
Hey Mike,
I am using BIRT 2.5.0.
Making it not required would work, except that the cascading parameter is 3 parts long, with the data being the middleman. If that isn't defined, then the third will not pull correctly.
Any other ideas? Scripting possibilities?
Thanks,
Jordan
Lianite
Alright, I did manage to get the default set to the current day, however it took a bit of roundabout work in 2.5.0. I had to create the cascading parameter, then modify the parameter when I set it up through a dataset. The only stipulation is that I couldn't go back in and modify the cascading parameter again, otherwise it would error and I would need to re-modify it through a dataset.
But, this could still cause problems for me. Ideally, what I would like to do is get the latest date from my dataset and set that as my default parameter instead of using the current date. Any idea how to do that?
Thanks,
Jordan