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)
Change Library used in report based on the parameter selection
RepBIRT
<p>The report has many libraries (each library with multiple styles) and has to be changed based on the parameter selection.</p><p> </p><p>It would be much appreciated, if someone can share or provide pointers for changing the library used by a report based on the parameter selection.</p>
Find more posts tagged with
Comments
kclark
<p>To change the themes by evaluating a parameter it would be something like this</p><pre class="_prettyXprint _lang-">if(params["Theme"].value == "Theme 1") { t = reportContext.getReportRunnable().designHandle.getModuleHandle().findTheme("new_library.Theme1"); reportContext.getReportRunnable().designHandle.getModuleHandle().theme=t;}else if(params["Theme"].value == "Theme 2") { t = reportContext.getReportRunnable().designHandle.getModuleHandle().findTheme("new_library.Theme2"); reportContext.getReportRunnable().designHandle.getModuleHandle().theme=t;}</pre><p>So it'd be a similar approach. You can find the libraries using a line of code like this</p><pre class="_prettyXprint _lang-">lib = reportContext.getReportRunnable().designHandle.getModuleHandle().findLibrary("new_library");</pre><p>It's just a matter of setting it now
I'm looking through the API docs now to figure out how to set it and will let you know
</p>