Aspose.Words

Using the Demos

Aspose.Words for JasperReports includes a number of demo projects to help you get started exporting reports to Microsoft Word document formats from your application. The demos provided with Aspose.Words for JasperReports are standard JasperReports demos, but they were modified to demonstrate the usage of new exporters.

To run Aspose.Words for JasperReports demos perform the following steps:

1.       Download JasperReports from http://sourceforge.net/project/showfiles.php?group_id=36382&package_id=28579. Make sure to download the entire archived project with the source code and demos, not just a single JAR.

2.       Unpack the archived project to some location on your hard disk, for example C:\.

3.       Copy all demo folders from the \demo folder of aspose.words.jasperreports.zip to <InstallDir>\jasperreports\demo\samples, where <InstallDir> is the location you have unpacked JasperReports to. This step is required because demo build scripts rely on the JasperReports’ folder structure, otherwise you will need to modify build scripts.

4.       Copy appropriate aspose.words.jasperreports-<Version>.jar from the \lib folder of aspose.words.jasperreports.zip to <InstallDir>\jasperreports\lib.

5.       Download the ANT tool from http://ant.apache.org/bindownload.cgi. Unpack the ANT tool and set up environment variables as described in the tool’s manual.

6.       Change the current directory to <InstallDir>\demo\hsqldb and run the following command line:

ant runServer

7.       Change the current directory to one of the Aspose.Words for JasperReports demos, for example <InstallDir>\demo\samples\charts.aw and run the following commands in the command line:

ant javac - to compile the java source files of the test application

ant compile - to compile the XML report design and produce the .jasper file

ant fill - to fill the compiled report design with data and produce the .jrprint file

8.       Run one or more of the following commands in the command line:

·          ant doc - to produce a DOC file from the demo report

·          ant docx - to produce a DOCX file from the demo report

·          ant rtf - to produce an RTF file from the demo report

·          ant odt - to produce an ODT file from the demo report

·          ant html - to produce an HTML file from the demo report

·          ant txt - to produce a TXT file from the demo report

9.       Open one of the resulting documents to view, for example <InstallDir>\demo\samples\charts.aw\AreaChartReport.doc in Microsoft Word or another application.

Folder \demo\webservices of aspose.words.jasperreports.zip contains readme.txt file with instructions how to use Aspose.Words for JasperReports with JasperServer Web Services demo application.