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)
Selective rendering of report items based on report format?
karis
Is there any easy way to bypass the rendering of certain elements of a report depending on the format the report is requested in?
I have a report with some graphs and a cross-tab, and the graphs aren't rendering well in Excel, but we only need the cross-tab data in that format. Is it possible to exclude the graphs from the report if Excel format is requested?
Find more posts tagged with
Comments
kclark
I think the best way to do this would be to drop the charts based on the outputformat from reportContext with some code like this.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if(reportContext.getOutputFormat() == "xls") {
mychart = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("CHART");
mychart.drop();
// Add other items here to be dropped
}</pre>
<br />
Have you tried any of the other xls emitters in the marketplace?
karis
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="114164" data-time="1360770908" data-date="13 February 2013 - 08:55 AM"><p>
I think the best way to do this would be to drop the charts based on the outputformat from reportContext with some code like this.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if(reportContext.getOutputFormat() == "xls") {
mychart = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("CHART");
mychart.drop();
// Add other items here to be dropped
}</pre>
<br />
Have you tried any of the other xls emitters in the marketplace?<br /></p></blockquote>
<br />
Thanks, but I found an easier solution! If you click on an element and go to the property editor you can hide the element for specific formats under the visibility tab.