Integrazione con JasperServer
Contents
 [
      
        Hide
      ]
    
Per integrare Aspose.Cells for JasperReports con JasperServer, esegui i passaggi seguenti.
In all of the following steps  stands for the JasperServer installation directory.
 
- Add the following new exporter properties to the \apache-tomcat\webapps\jasperserver\WEB-INF\flows\viewReportBeans.xml file.
XML
 <bean id="reportACXlsExporter" class="com.aspose.cells.jasperreports.ACReportXlsExporter" parent="baseReportExporter">
   <property name="exportParameters" ref="excelACExportParameters"/>
   <property name="setResponseContentLength" value="true"/>
</bean>
<bean id="xlsACExporterConfiguration" class="com.jaspersoft.jasperserver.war.action.ExporterConfigurationBean">
   <property name="descriptionKey" value="XLS - Excel Presentation via Aspose.Cells"/>
   <property name="iconSrc" value="/images/xls.gif"/>
   <property name="parameterDialogName" value="excelACExportParams"/>
   <property name="exportParameters" ref="excelACExportParameters"/>
   <property name="currentExporter" ref="reportACXlsExporter"/>
</bean>
- Locate the <util:map id=”exporterConfigMap> element in the \apache-tomcat\webapps\jasperserver\WEB-INF\flows\viewReportBeans.xml file and add the following lines:
XML
 <util:map id="exporterConfigMap">
   <entry key="pdf" value-ref="pdfExporterConfiguration"/>
   <entry key="xls" value-ref="xlsExporterConfiguration"/>
   <entry key="rtf" value-ref="rtfExporterConfiguration"/>
   <entry key="csv" value-ref="csvExporterConfiguration"/>
   <entry key="swf" value-ref="swfExporterConfiguration"/>
<!-- START of ADDED LINES -->
   <entry key="xls" value-ref="xlsACExporterConfiguration"/>
<!-- END of NEW LINES -->
</util:map>
- Copy all GIF images from the \lib folder in the aspose.cells.jasperreports.zip to the \apache-tomcat\webapps\jasperserver\images folder.
- Copy the aspose.cells.jasperreports.jar file from the \lib folder in the aspose.cells.jasperreports.zip to the \apache-tomcat\webapps\jasperserver\WEB-INF\lib. folder.
- Add the following lines to the \apache-tomcat\webapps\jasperserver\WEB-INF\applicationContext.xml file. (Questo bean può contenere diverse impostazioni di configurazione destinate a configurare l’esportazione. Ad esempio, puoi utilizzare la funzionalità di mappatura dei font di JasperReports o specificare la posizione del file di licenza di Aspose.Cells for JasperReports.)
XML
 <bean id="excelACExportParameters" class="com.aspose.cells.jasperreports.ACXlsExportParametersBean"> <!-- Uncomment to apply a license. Check the license path.
<property name="licenseFile" value="C:/jasperserver-3.0/apache-tomcat/webapps/jasperserver/WEB-INF/Aspose.Cells.JasperReports.lic"/>
-->
</bean>
- Esegui JasperServer e apri un qualsiasi report da visualizzare. Se i passaggi precedenti sono stati eseguiti correttamente, saranno disponibili icone di formato aggiuntive.
Nuovi formati di esportazione disponibili (a destra) dopo l’installazione di Aspose.Cells for JasperReports su JasperServer
