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)
Format builder for parameter
cobirtops
My BIRT peeps,
I have a parameter where I've formatted the parameter value that the users will enter as uppercase. I must be doing something wrong because it no workie. The fields in my db are in uppercase; hence if user enters 'abc' at the parameter prompt in hopes of retrieving row 'ABC', the report returns no rows. Am I using the parameter format builder the way that I understand it was intended to be used? Or should I just word my prompt text as "Enter in uppercase"?
Thanks.
Find more posts tagged with
Comments
mwilliams
Hi cobirtops,
Where are you doing the conversion of the value to uppercase and what is the script you're using?
kjawahar
Here is one way to do it:
Change the parameter value to uppercase using toUpperCase() function and pass it to the database query
by overrding the query in the beforeOpen method of the dataset
this.queryText = "select * from employees where lastname = '" + params["empLastName"].toString().replace(/^\s+|\s+$/g,'').toUpperCase() + "'";