Jump to content
Changes to the Jaspersoft community edition download ×
  • Use the PPTX Exporter in Jaspersoft 5.5


    cameron_1
    • Features: Exporters Version: v5.5 Product: PPTX Exporter

    The current build of the PPTX exporter, PPTX Exporter Project, is built against verion 4.7.1 of Jaspersoft, not the latest version, 5.5.

    The instructions provided to compile from source, are also outdated, referencing changes needed in the Jasperosft source code. With 5.5, these changes are not necessary.

    These instructions should, in theory, also work for Version 5.0, 5.1 and 5.2, however they have not been tested.

    New JAR

    The attached JAR archive is a modified version of the original source. This has been compiled against version 5.5 of the Jaspersoft libraries, without any changes to the original (Jaspersoft) source code. The updated source files have also been attached if you find any bugs and need to recompile.

    This JAR should be placed in the webappsjasperserver-proWEB-INFlib directory

    Configure Jaspersoft Server

    Once you have the new pptx exporter library in place, you need to configure Jaspersoft to use it. This is done through the XML configuraiton files.

    Modify the following files, adding in or changing the supplied details

    webappsjasperserver-proWEB-INFapplicationContext.xml

    Add in the following bean, in the same location as the other <type>ExportParamaters beans

    <bean id="pptxExportParameters" class="com.jaspersoft.jasperserver.api.engine.jasperreports.common.PptxExportParametersBean"></bean>
    

    webappsjasperserver-proWEB-INFflowsviewReportBeans.xml

    In the <util:map id="exporterConfigMap"> section add in the following -

    <entry key="pptx" value-ref="pptxExporterConfiguration"/>
    

    In the "report<type>Exporter" bean section (just before the "reportExporter" bean itself) add in the following bean -

    <bean id="reportPptxExporter" class="com.jaspersoft.jasperserver.war.action.ReportPptxExporter" parent="baseReportExporter">
        <property name="setResponseContentLength" value="true"/>
    </bean>
    

    In the "<type>ExporterConfiguration" section add in the following bean -

    <bean id="pptxExporterConfiguration" class="com.jaspersoft.jasperserver.war.action.ExporterConfigurationBean" scope="prototype">
        <property name="descriptionKey" value="jasper.report.view.hint.export.pptx"/>
        <property name="iconSrc" value="/images/pptx.png"/>
        <property name="exportParameters" ref="pptxExportParameters"/>
        <property name="currentExporter" ref="reportPptxExporter"/>
    </bean>
    

    webappsjasperserver-proWEB-INFbundlesjasperserver_messages.properties

    Add in the following property (can be anywhere, however putting it near the other "jasper.report.view.hint.export" properties would be sensible) -

    jasper.report.view.hint.export.pptx=As Powerpoint
    

    Scheduler

    The previous method of adding new exporters in the reportJobBeans.xml file no longer works in version 5.5. with the new report scheduling interfaced intoduced in this version, it appears they hard coded a lot of the functionlity of the exporters, including areas like the jsp page to display the available exporters and the rest API that schedules the job and validates the options selected.

    If you are using version 5.2 you may be able to get this working using the old method. It is documented in the Jaspersoft Server Ulitmate Guide in section 11.10.3. The attached JAR archive should implement the correct interface as documented in step 1. Unfortunatley I've not been able to test this.

    pptxexport.jar

    js-pptx-files.zip

    pptxexport_0.jar

    js-pptx-files_0.zip


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...