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)
Dynamically create Report Parameters in RPTDESIGN
Abhishek Birjepatil
<p>Hi,</p>
<p> </p>
<p>We are currently using a driver report for bursting and saving the output on a shared network location.</p>
<p>The driver report would be scheduled with the parameters.</p>
<p>A single driver report is able to execute different reports.</p>
<p>However, set of parameters can be different across different reports. The input parameters for the child report should be present in the DriverReport for it to Execute the child report.</p>
<p> </p>
<ol><li>Is it possible to dynamically create parameters using Script in RPTDESIGN ?</li>
<li>Can the value of a parameter be used in a function which fetches a list for a second parameter.</li>
</ol><p>Thank you,</p>
<p>Abhishek.</p>
Find more posts tagged with
Comments
Matthew L.
<p>To answer your questions:</p>
<p>1: Yes you can create parameters within a report design.</p>
<p>Per this example, it will create a new ScalarParameterHandle, set it to required, and set a default value (use in beforeFactory).</p>
<p>Then add it back to the same report its being run from:</p>
<pre class="_prettyXprint _lang-js">
scalarParameterHandle = reportContext.getDesignHandle().getElementFactory().newScalarParameter( "Example Parameter" );
scalarParameterHandle.setIsRequired( true );
scalarParameterHandle.setDefaultValue( "Test" );
reportContext.getDesignHandle().getParameters().add( scalarParameterHandle ); </pre>
<p>*Note, that unless you save the updated report, you will not see these report parameters, and you will have to run the report a second time in order to see these new parameters within the parameter page (See attached example for a demonstration on this behavior).</p>
<p> </p>
<p>2: I'm not sure what you are asking for per this question, can you explain your use case in more detail?</p>
<p>*are you trying to create something like a cascading parameter effect between two completely different parameters?</p>
<p> </p>
<p>Also have you looked into Actuate IDAPI, it could be helpful.</p>
<p> </p>
<p>I've also attached an example that "could?" be useful.</p>
<p>The "Driver" report reads in the "Child" report's report design, extracts and copies all the parameters from the "Child" report into the "Driver" report.</p>
<p>So to demonstrate, you would run the "Driver" report once and you wont see any parameters asked.</p>
<p>If you run the "Driver" report a second time, you will now see the parameters that existed in the "Child" report appear in the "Driver" report (because the "Driver" report design has been updated).</p>
<p>Using this as an example, you could create a "Driver" report that auto updates itself per the specified "Child" reports, then you would just have to link the parameters between the "Driver" and "Child" reports when using it as a report launcher.</p>
<p> </p>
<p>*Based on what I think you are trying to accomplish, this is how I would accomplish it:</p>
<p>Have the "Driver" report dynamically create a "Parameter" report based on the "Child" report's, the "Driver" report would have no user input, but instead generate the "Parameter" report and launch it automatically, which would give the user a parameter page to enter all the parameter values in, then once the user finishes entering parameter values, the "Parameter" report would launch all the "Child" reports by passing their respective parameter values.</p>
<p> </p>