Licensing

Call setLicense

Download the license to your computer and copy it to the appropriate folder (for example your application’s folder or JasperReports\lib). Add the following code to your project:

import com.aspose.cells.jasperreports.*;

// Create a stream object containing the license file

FileInputStream fstream = new FileInputStream("C:\\Aspose.Cells.JasperReports.lic");

// Set the license through the stream object

License license = new License();

license.setLicense(fstream);

Set the licenseFile Exporter Parameter in applicationContext.xml

  1. Download the license to your computer and copy it to the <InstallDir>\apache-tomcat\webapps\jasperserver\WEB-INF folder, where <InstallDir> stands for the JasperServer installation directory.
  2. Locate the <InstallDir>\apache-tomcat\webapps\jasperserver\WEB-INF\applicationContext.xml file and add the following lines:

XML

  <bean id="excelACExportParameters" class="com.aspose.cells.jasperreports.ACXlsExportParametersBean">

    <property name="licenseFile" value="C:/jasperserver-3.0/apache-tomcat/webapps/jasperserver/WEB-INF/Aspose.Cells.JasperReports.lic"/>

</bean>

Verify the License Works

Export any report to XLS format and check if the report contains an evaluation message. If there is no evaluation message, then the license is working properly.

Aspose.Cells for JasperReports injects an evaluation worksheet in evaluation mode

todo:image_alt_text

When a valid license there is no evaluation worksheet

todo:image_alt_text