Tribix PPT emitter for BIRT WebViewer v4.2.1 [message #1008934] |
Thu, 14 February 2013 02:13  |
Eclipse User |
|
|
|
HI,
I have been trying to enable the Tribix PPT emitter for my BIRT Web viewer v4.2.1. At the moment the viewer will not export to Powerpoint 2010 without error, as outlined in this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=328982
There are many posts on this forum and the web related to Tribix emitters, but having tried to follow a few of them I always get stuck as there is not enough info for my level of knowledge about the engine, or the versions are slightly different and referenced directories no longer exist.
I have so far downloaded the Tribix PPT emitter from here: http://sourceforge.net/projects/tribix/
I have followed some forum posts and extracted the files, making new jars and inserting them but my many attempts have not prevailed. I can not determine how to set the viewer to use the new emitter ids correctly, or how to remove the default emitters.
I am not concerned about my designer exporting to PPT in Powerpoint 2010, just the viewer export facility.
If someone has got this working, could you please offer some advice or detailed step by step process?
Any help would be greatly appreciated.
David
|
|
|
|
Re: Tribix PPT emitter for BIRT WebViewer v4.2.1 [message #1009401 is a reply to message #1009206] |
Thu, 14 February 2013 23:18   |
Eclipse User |
|
|
|
Thanks for the quick response Jason, it is appreciated.
I had already followed your post as part of my many attempts to get this working and can now see that my error was how I repackaged the various JAR files. Using jar.exe over-writes the manifest details, causing errors.
I now have the Tribix PPT emitter working successfully, so I have put a step by step process together which closely resembles your xls version. Hopefully anyone else having the same issues may find it useful.
Thanks for the help.
David.
Steps:
1. Extract contents of BIRT runtime JAR in WebViewer\WEB-INF\lib and comment PPT emitter entry in plugin.xml
<!--import from org.eclipse.birt.report.engine.emitter.config.ppt-->
<!-- DG: comment out for Tribix ppt emitter use
<extension name="PPT Emitter Descriptor" point="org.eclipse.birt.report.engine.emitter.config">
<descriptor class="org.eclipse.birt.report.engine.emitter.config.ppt.PPTEmitterDescriptor" id="org.eclipse.birt.report.engine.emitter.ppt"/>
</extension>
-->
2. In the META-INF directory, delete everything except MANIFEST.MF Modify the manifest file as follows:
(** Insert correct version at Bundle-Version)
Manifest-Version: 1.0
Bundle-Vendor: Eclipse.org
Bundle-Name: BIRT Runtime SDK
Bundle-SymbolicName: org.eclipse.birt.runtime
Bundle-Version: 4.2.1.v20120918-1113
3. Create modified JAR named org.eclipse.birt.runtime_4.2.1.v20120918-1113.jar
*** IMPORTANT: on my first attempt I used jar.exe to create the jar but this caused the manifest file to be overwritten with the following.
Manifest-Version: 1.0
Created-By: 1.7.0_13 (Oracle Corporation)
Upon startup I got a fatal error: "+ Fatal error occurred when try to startup report engine."
You must ZIP the new contents (i.e. create org.eclipse.birt.runtime_4.2.1.v20120918-1113.jar.zip) then rename the resulting file to .jar, keeping the new manifest in tact.
4. Over-write the existing BIRT runtime JAR in WebViewer\WEB-INF\lib with the new one.
5. Unpack org.uguess.birt.report.engine.emitter.ppt_2.5.2.201107181644.jar
MOVE ppt-emitter.jar to WebViewer\WEB-INF\lib
MOVE lib\poi-3.7-20101029.jar to WebViewer\WEB-INF\lib
MOVE lib\poi-scratchpad-3.7-20101029.jar to WebViewer\WEB-INF\lib
*** Note there were NO commons logging jars in the emitter\lib directory as stated in xls examples:
lib/commons-logging-version.jar
lib/commons-jexl-version.jar
6. Package remaining files into a modified org.uguess.birt.report.engine.emitter.ppt_2.5.2.201107181644.jar
*** IMPORTANT: zip and then rename the contents to keep the manifest in tact. Mine was as follows:
Manifest-Version: 1.0
Require-Bundle: org.eclipse.core.runtime,org.uguess.birt.report.engine.common
Bundle-Vendor: Uguess.org
Eclipse-LazyStart: true
Bundle-ClassPath: ppt-emitter.jar,lib/poi-3.7-20101029.jar,lib/poi-scratchpad-3.7-20101029.jar
Bundle-Version: 2.5.2.201107181644
Bundle-Localization: plugin
Bundle-Name: Ppt Emitter Plug-in for BIRT
Bundle-Activator: org.uguess.birt.report.engine.emitter.ppt.Activator
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.uguess.birt.report.engine.emitter.ppt;singleton:=true
7. Copy MODIFIED org.uguess.birt.report.engine.emitter.ppt_2.5.2.201107181644.jar AND
org.uguess.birt.report.engine.common_2.5.2.201107181644.jar to WebViewer\WEB-INF\lib
8. Modify BirtExportReportDialog.js in WebViewer\webcontent\birt\ajax\ui\dialog adding the if( format=="ppt"){} block:
__exportAction : function( )
{
.
.
.
else
{
action = action.replace( reg, "$1=false" );
}
// use Tribix emitter
if( format=="ppt"){
action = action + "&__emitterid=org.uguess.birt.report.engine.emitter.ppt"
}
formObj.action = action;
formObj.method = "post";
formObj.submit( );
return true;
}
9. Move new viewer to Tomcat\webapps directory. Load reports, resources and db drivers where required.
10. Delete temp and work directories from Tomcat home and restart services.
11. Test report successfully exports to PPT 2010.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02993 seconds