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)
Difficulty Setting Rendering Defaults on BVT Built-In Emitters
Bri
<p>Using BIRT 3.7.2, we pass requests to the BIRT Viewer (set up as a Tomcat Plugin). Some of our reports are abnormally large from the built-in HTML Emitter. Doing some research, there are preferences that can be set to remedy this when calling the reporting engine directly, but not available through HTTP requests.</p>
<p> </p>
<p>Specifically there is option.setOption( IHTMLRenderOption.HTML_ENABLE_COMPACT_MODE, true ); and option.setEnableCompactMode( true );</p>
<p> </p>
<p>I thought I could add a RenderDefaults.cfg to the org\eclipse\birt\report\engine\emitter\config\html path within the org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar file but there doesn't seem to be a way to repackage the jar file in a way Tomcat will accept and run it. I have to remove the signatures for BIRT to load in Tomcat, but even doing that, the BVT comes to an error "org.eclipse.birt.report.exception.ViewerException: Fatal error occurred when try to startup report engine." (sic)</p>
<p> </p>
<p>All I want to do is tell the built-in HTML emitter to use compact mode as a default setting.</p>
<p> </p>
<p>Anyone have ideas on how to do this ... or perhaps some ideas on how to get the BIRT Viewer in Tomcat to work after re-jar-ing the directory? (There doesn't seem to be a way to re-jar the package without stripping out the signatures from the META-INF folder.)</p>
<p> </p>
<p>Thanks!</p>
Find more posts tagged with
Comments
Bri
<p>I found my problem. I forgot to tell jar to use the manifest file in the META-INF directory. jar overwrites it with its own version otherwise:<br><br>
jar cmvf META-INF\MANIFEST.MF ..\org.eclipse.birt.runtime_3.7.2.jar *<br><br>
Hope this helps others out there.</p>
<p> </p>
<p>Cheers!</p>
Bri
<p>I'm not out of the woods, yet. The RenderDefaults.cfg file seems to be ignored.</p>
<p> </p>
<p>The contents are this:</p>
<p>htmlEnableCompactMode = true</p>
<p> </p>
<p>I tried putting it in the org.eclipse.birt.runtime_3.7.2.v20120214-1408\org\eclipse\birt\report\engine\emitter\config\html path, and it didn't seem to work. I tried several other paths, too.</p>
<p> </p>
<p>I based the key/value pair's key on code in line 366 of the IHTMLRenderOption.java:</p>
<p> </p>
<p> /**<br>
* Using compact mode or not. If compact mode is enabled, text indents and<br>
* new line separators will be ignored in html output.<br>
*/<br>
public static final String HTML_ENABLE_COMPACT_MODE = "htmlEnableCompactMode";</p>
<p> </p>
<p>The IHTMLRenderOption.java is part of the solution I loaded into eclipse to look through the source code in hopes of determining how to set this very option. (org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/IHTMLRenderOption.java)</p>
<p> </p>
<p>I have a feeling that I'm going to need one of the BIRT gurus to help out here.</p>
<p> </p>
<p>How do I get the BIRT Viewer in Tomcat to default its HTML output to Compact mode?</p>
<p> </p>
<p>Thanks!</p>