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)
Setting params in code?
amyksmith
I have created three report parameters (problem, cause, remedy). I set them to a data row value as follows (fetch method of inner data set):<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if (row["type"] == 'PROBLEM')
params["problem"] = row["description"];
if (row["type"] == 'CAUSE')
params["cause"] = row["description"];
if (row["type"] == 'REMEDY')
params["remedy"] = row["description"];</pre>
<br />
I want to reset the parameters to empty strings after displaying them, so I added the following code to the fetch method of the outer data set:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>params["problem"] = null;
params["cause"] = null;
params["remedy"] = null;</pre>
<br />
This seems to work in the BIRT viewer, but when run it in Maximo, that code does not seem to be read. If the parameters do not receive a new value, they don't reset to null, they just continue to display what was stored in them last.<br />
<br />
Any ideas? I can explain better if necessary.
Find more posts tagged with
Comments
amyksmith
OK, I figured this out. I put the second code snippet in the beforeOpen method of the inner data set and it worked.