Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Report parameters
Kurt
Hello,
I created a report with couple of report parameters. They are Unbound report parameters.
I mentioned in Open method as
if(params["owner"].value != null && params["owner"] != "")
params["where"]+= " and a_workorder.owner = upper('" + params["owner"] + "') ";
Now, The report fetching the data only if i give complete owner value, But I would want to give only a part of owner value(Say if owner value is "D20311" and i would want to give only d20) and based on that value report should fetch all the records whose owner has that part of the value.
Then i tried below code in open method...
if(params["owner"].value)
params["where"]+= " and "+ MXReportSqlFormat.createParamWhereClause("workorder.owner", params["owner"]);
Now, this fetching the data if i give part of the owner value but for this i have to give exact(If owner value is "D20311" its not accepting "d20" it only taking "D20" - case sensitive) how it present in owner column in workorder table, I mean its case sensitive.
Any ideas on how to combine both conditions in one like i wanna give part of owner value either in upper case or lower case but report recognize it and should fetch the data? Suggest me what would i change in open menthod in order to get desired output.
Thanks in advance!!!
Regards,
Kurt.
Find more posts tagged with
Comments
mwilliams
Hi Kurt,
Have you tried using the toUpperCase() function to force the d20 into D20 so it's accepted every time?
Kurt
Michael,
Thanks for the reply, Could you tell me where exactly i need to append toUpperCase() function in below code..
if(params["owner"].value)
params["where"]+= " and "+ MXReportSqlFormat.createParamWhereClause("workorder.owner", params["owner"]);
Please suggest me with an example..Thanks!!
Regards,
Kurt.
mwilliams
Kurt,
I would assume if the "owner" parameter is the one that may be d20 or D20, that you would put:
if(params["owner"].value)
params["where"]+= " and "+ MXReportSqlFormat.createParamWhereClause("workorder.owner", params["owner"].toUpperCase());
Let me know.
Kurt
Thanks Michael, It just working as i expected.
Cheers
Regards,
Kurt