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)
Reading Params without knowing there name
mcremer
I have a question I hope some of you experts can shed some light on.
I want to read out my report parameters but not name them.
Example:
I have the following situation:
Parameter group - REPPORTID
|- REPPORTID
Parameter group - LOGINFO
|- REPPORTID1
|- REPPORTID2
|- REPPORTID3
Now if I want to get the parameters in JavaScript I have to use the params["RAPPORT"].value. Now what I want is actually get all the parameters of a group eg:
arrayList = getParmgroup("LogINFO");
for (item : arrayList){
dosometing(item);
}
I want to make it as generic as posible so it can be put in a template and I dont ahve to realy think about these actions again.
Find more posts tagged with
Comments
mwilliams
I haven't figured out how to access the names of the parameters without knowing them. Can you explain more about what you're trying to do? Maybe something else can be thought of to help.
kjawahar
Take a look at this one:
http://www.birt-exchange.org/org/forum/index.php/topic/20126-how-to-retrieve-report-parameters-at-runtime/page__s__04731dd4ad7ac5b9c8b702428b7fd945
mcremer
<blockquote class='ipsBlockquote' data-author="'kjawahar'" data-cid="70423" data-time="1290044943" data-date="17 November 2010 - 06:49 PM"><p>
Take a look at this one:<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/index.php/topic/20126-how-to-retrieve-report-parameters-at-runtime/page__s__04731dd4ad7ac5b9c8b702428b7fd945'>http://www.birt-exchange.org/org/forum/index.php/topic/20126-how-to-retrieve-report-parameters-at-runtime/page__s__04731dd4ad7ac5b9c8b702428b7fd945</a><br
/></p></blockquote>
<br />
Sorry for the vary late response I sort of made a workaround for now. But what I mean is in the iServer you can actually retrieve the parameters of a report. Part of the soap msg are:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><soapenv:Header><TargetVolume>zlm-birto</TargetVolume><AuthId>cfMOutp7qK/mhGpizNfkqf21hA9+AaIGmT7Mn+uB0dXjmqW4ySCU0cY8NTtw8JVCZ3nAuvb2d/zB9wCCmbjjx50M1uugrVqRbFFv3aOk5BXM2A/H1aWJMg==</AuthId></soapenv:Header>
<soapenv:Body><act:GetReportParameters><act:ReportFileName>Public/ZLMO04/SC/SC-020.RPTDESIGN</act:ReportFileName></act:GetReportParameters></soapenv:Body></pre>
<br />
Now what I actually want is create a template that is dynamically check for certain newly added Parameters. And if there available check them against a DataSet. This is becouse this is how we get disciption etc from the databse. <br />
<br />
What I did now is actealy a bit over complex ingeneering as putting in a data field the folowing code:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>params[dataSetRow["CODE"]].value;</pre>
<br />
now this works fine as long as the parameter exist in the report. But sometimes when your designs or testing (during development or showing a proof of concept) the database could have new parameters already and it would try to get the parameter that doesn't exist making it fail generating that table. Witch of course doesn't look good at all.<br />
<br />
And because I tough I can request the iServer for all the parameters I can also request when in the report rendering the parameters (or retrieving it from the dataset) I can ask what parameters are available. But this seems not the case as far as I can tell.