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)
Report Parameter displayText
leeysh
Hi,
I'm using BIRT 2.3.2. I have a report which has a parameter valuelist lookup defined in MAXIMO. I want to display the description of the selected parameter at the Master Page Header. I tried
1) using params["Name"].displayText, but it returns me null. I believe it's because when I select via the lookup, it returns the equal sign "=Selection". I would like to know is there any ways to display?
2) Tried (params["Name"].substring(1)).displayText but not successful.
3) Tried Dynamic Text, and script in onCreate and onRender.
OnCreate, set the parameter display text reportContext.setParameterDisplayText("Name1","Description of Name").
OnRender, reportContext.getParameterDisplayText("Name1"). But this method is not successful either.
Appreciate any help and suggestion!
Thank you in advance!
Gen
Find more posts tagged with
Comments
micajblock
If I recall correctly in BIRT 2.3.2 params["Name"].displayText is not available. Only params["Name"].value works.
leeysh
Hi,
Thank you for your reply.
I'll add on some clarification to my previous post. I've tried removing the "=" when I input the parameter and params["Name"].displayText works fine.
Currently, I'll like to know whether there's ways to remove the "=" sign for the parameter apart from user manually removing it? I'm looking for alternative than hard-coding the description into the Dynamic Text.
Thanks!
Gen
micajblock
Maximo must be passing the '=' sign as BIRT alone does not.
leeysh
Yup, MAXIMO is passing the "=" to BIRT, no doubt on that. I just want to know if BIRT has features to remove the passed in "=", apart from hard-coding in the rptdesign?
Thanks!
Gen
micajblock
You can use the validate event on the parameter to check for it.
wwilliams
Try the following as an example
and po.siteid = '" + params["site"].replace(/[=!,]/,"")+ "'"
Alisyah
<blockquote class='ipsBlockquote' data-author="'wwilliams'" data-cid="112657" data-time="1356033970" data-date="20 December 2012 - 01:06 PM"><p>
Try the following as an example<br />
and po.siteid = '" + params["site"].replace(/[=!,]/,"")+ "'"<br /></p></blockquote>
<br />
The following sample works well for me:<br />
var site = new String();<br />
site = params["site"].value.replace(/=/g, "");
DavidRiep
I use the syntax <br />
<br />
params["site"].replace("=", "")<br />
<br />
for another alternative which also seems to work well
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'Alisyah'" data-cid="113923" data-time="1360050445" data-date="05 February 2013 - 12:47 AM"><p>
The following sample works well for me:<br />
var site = new String();<br />
site = params["site"].value.replace(/=/g, "");<br /></p></blockquote>