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)
Exporting report content which has client scripting
klt64
<p>Hi,</p>
<p>I am using Actuate Birt Designer Professional 4.2.3 and have created a HTML5 chart which has two series : a stacked bar chart and line series. Included is some scripting to set the axis scale of the line series the to match the axis scale of the bar chart. Also I have reversed the order of the legend via scripting.</p>
<p>It seems that this scripting is lost when attempting to export the content of the chart to xls or xlsx because the axis and legend order reverts back to the default. </p>
<p>The scripting is not ignored when exporting the content to pdf.</p>
<p> </p>
<p>Is it possible to ensure that Excel displays the chart exactly as per Actuate Birt & PDF ?</p>
<p>Many thanks,</p>
<p> </p>
Find more posts tagged with
Comments
mwilliams
<p>My guess is that you might need to contact support regarding this and have a bug filed. Before you do that, could you set up a sample with the sample database or a static data source or something that you can attach for me to run and test this? Maybe we can figure something out. Thanks.</p>
micajblock
<p>My guess is that when we export to Excel we create a Excel chart and Excel does not support JavaScript. </p>
mwilliams
<p>I agree that's probably it. Sounds like this could be an enhancement request for the Excel emitter to evaluate the script before exporting so the appropriate chart is rendered.</p>
micajblock
<p>The issue would be - what if the script is doing something that is not supported in Excel charts.</p>
mwilliams
<p>Then it still won't work, I guess, but the supported stuff would at least change.
</p>
klt64
<p>Many thanks to you both for your replies.</p>
<p>Attached is a sample report using the classic models data.</p>
<p> </p>
mwilliams
<p>I'll take a look at your design to see if there is something that can be done on the report side to get the changes to happen before going to the Excel emitter. If we can't get something workable, you'll need to go through Actuate support to get a ticket created for this as an enhancement/bug fix for a later release.</p>
mwilliams
<p>Unfortunately, the options for server side scripting with the HTML5 charts are very limited. If you reversed the order of your series, you could get the reversed legend order, but this would also change the look of the chart. You'll need to go through Actuate support and file an enhancement request.</p>
klt64
<p>Thank you Michael - the reverse legend order doesn't always work correctly when exporting to Excel. The second line series changes position on the export.</p>
<p>Do you have any more thoughts on the scaling issue - or should I raise a log with Support ?</p>
<p>Kind regards,</p>
mwilliams
On the scaling issue, the script you have in the beforeGeneration doesn't seem to actually work in the HTML5 chart. HTML5 seems to want to match the axes scales automatically. If you deselect the line series from being stacked in the value series section of the format chart tab in the chart editor, you get better axis scales.<br><br>With all of that said, none of the axis scale settings translate over to Excel. Either Excel doesn't allow the emitter to control the scale or this is something that needs to be put in as a bug or enhancement request. Definitely bring this up with support.