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)
Modify Export content page settings
rajkishore
<p>I was trying to look a workaround for exporting excel issues with HTML5 charts in ihub3.As workaround I would like to export charts to excel as a image. To export chart as image we have option to set in export content page setting and select the "Export charts as image ".</p>
<p> </p>
<p>Can we able to set this option by default to "selected".i.e check box selected.do we can write any script in report to set this option by default?</p>
<p> </p>
<p>I tried to set in report client script oncontentupdate using viewer UIOptions.but I didn't get any luck.</p>
<p> </p>
<p>Regards</p>
<p>Kishore G</p>
Find more posts tagged with
Comments
JFreeman
<p>You can do this by modifying the emitter configuration on the iHub or Designer instead of doing it from within the report design.</p>
<p> </p>
<div>In the iHub3 release there is a series of XML files which can be modified to change the default export options for the emitters that ship with the product.</div>
<div> </div>
<div>In a BD Pro installation these files may be found in the following directory path:</div>
<div> </div>
<div><BD Pro Installation Directory>\BDPro\eclipse\plugins\com.actuate.birt.report.engine.emitter.config_23.0.0.v20131216</div>
<div> </div>
<div>In an iHub3 Visualization installation these files may be found in the following directory path:</div>
<div> </div>
<div><BIRT iHub3 Installation Directory>\BIRTiHubVisualization\modules\BIRTiHub\iHub\Jar\BIRT\platform\plugins\com.actuate.birt.report.engine.emitter.config_23.0.0.v20131216</div>
<div> </div>
<div> </div>
<div>Within the directory there will be a series of XML files labeled to match their emitters such as "org.eclipse.birt.report.engine.emitter.pdf.xml".</div>
<div> </div>
<div>Open the XML file in a text editor for the corresponding emitters whose default export options are desired to be changed. Using the "org.eclipse.birt.report.engine.emitter.pdf.xml" example above, the file will look similar to the following:</div>
<div> </div>
<div><?xml version="1.0" encoding="UTF-8"?></div>
<div><!--</div>
<div>The configuration file is used to enable/disable render options and change their default values.</div>
<div>The "name" and "default" field are required, and the "enabled" field is optional. If unset, it will be true by default.</div>
<div>The "enabled" option is stored in ConfigurableOption, and can be accessed via IConfigurableOption.isEnabled().</div>
<div>If the old configuration file RenderDefaults.cfg/RenderOptions.xml is also present in config plugin jar, </div>
<div>this file will override the default values in RenderDefaults.cfg/RenderOptions.xml.</div>
<div> --></div>
<div><!-- The following is a sample. Uncomment the desired option to activate the configuration --> </div>
<div><RenderOptions></div>
<div><!-- Enables the emitter. Set to "false" will hide this emitter in export content dialog. --></div>
<div><!--</div>
<div><emitter enabled="true"/></div>
<div>--></div>
<div><!--</div>
<div><option name="ChartDpi" default="192" enabled="true"/></div>
<div><option name="TextHyphenation" default="false" enabled="true"/></div>
<div><option name="RenderChartInSVG" default="true" enabled="true"/></div>
<div><option name="BIDIProcessing" default="true" enabled="true"/></div>
<div><option name="TextWrapping" default="true" enabled="true"/></div>
<div><option name="EmbeddedFont" default="true" enabled="true"/></div>
<div><option name="FontSubstitution" default="true" enabled="true"/></div>
<div><option name="repaginateForPDF" default="false" enabled="true"/></div>
<div>--></div>
<div> </div>
<div></RenderOptions></div>
<div> </div>
<div>The list of commented out options are the options available whose defaults may be modified. In order to make a modification, such as changing the default export option for rending the chart in SVG, the corresponding commented out entry should be copied to after the commented section ends and the corresponding Boolean value should be modified.</div>
<div> </div>
<div>For example, to make the default export options have the selection for exporting to SVG unselected by default, the file should look similar to the following after modification:</div>
<div> </div>
<div><?xml version="1.0" encoding="UTF-8"?></div>
<div><!--</div>
<div>The configuration file is used to enable/disable render options and change their default values.</div>
<div>The "name" and "default" field are required, and the "enabled" field is optional. If unset, it will be true by default.</div>
<div>The "enabled" option is stored in ConfigurableOption, and can be accessed via IConfigurableOption.isEnabled().</div>
<div>If the old configuration file RenderDefaults.cfg/RenderOptions.xml is also present in config plugin jar, </div>
<div>this file will override the default values in RenderDefaults.cfg/RenderOptions.xml.</div>
<div> --></div>
<div><!-- The following is a sample. Uncomment the desired option to activate the configuration --> </div>
<div><RenderOptions></div>
<div><!-- Enables the emitter. Set to "false" will hide this emitter in export content dialog. --></div>
<div><!--</div>
<div><emitter enabled="true"/></div>
<div>--></div>
<div><!--</div>
<div><option name="ChartDpi" default="192" enabled="true"/></div>
<div><option name="TextHyphenation" default="false" enabled="true"/></div>
<div><option name="RenderChartInSVG" default="true" enabled="true"/></div>
<div><option name="BIDIProcessing" default="true" enabled="true"/></div>
<div><option name="TextWrapping" default="true" enabled="true"/></div>
<div><option name="EmbeddedFont" default="true" enabled="true"/></div>
<div><option name="FontSubstitution" default="true" enabled="true"/></div>
<div><option name="repaginateForPDF" default="false" enabled="true"/></div>
<div>--></div>
<div> </div>
<div><option name="RenderChartInSVG" default="false" enabled="true"/></div>
<div> </div>
<div></RenderOptions></div>
<div> </div>
<div> </div>
<div>There are two Boolean values which can be modified for the settings. The first, "default", will change the behavior of whether the options is select or not selected by default during an export with the emitter. The second, "enabled", determines whether the option is available for selection during an export or not.</div>
rajkishore
<p>Hi Jfreeman,</p>
<p> </p>
<p>i was not expecting this, as this will effect the all the reports that are running ihub3 sever or BIRT designer. Instead of that can we write any script/option in a particular HTML5 report to only exported as image.</p>
<p> </p>
<p>As we know if we write any client script in charts, the scripts are not working in XLS. Because of that look and fell is different than webviewer and xls. To avoid this , i want export chart as image , instead of training the user always select them as <span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">"Export charts as image ". By default those effected reports(because script) can we allow export as image.</span></p>
<p> </p>
<p><span>Regards</span></p>
<p><span>Kishore G</span></p>
JFreeman
<p>There is not going to be an out of the box way to do this from within a report design. The export dialogue menus are generated from a separate JSP that does not have any direct interaction from within a report design.</p>
<p> </p>
<p>I believe it my be technically possible to create a customization that will handle this on a per report basis but it isn't really a feasible customization, particularly when it comes to maintainability.</p>
<p> </p>
<p>There is a javascript file that is used to populate the contents of the export dialogue box that could potentially be modified to change the default settings depending on which report is loaded in the viewer. However, this is an obfuscated javascript file that can change with new releases. Making changes to these javascript files is not typically recommended and will not be supported if an issue arises.</p>