演示设置
Contents
[
Hide
]
Aspose.Cells for JasperReports 包括许多演示项目,帮助您开始从应用程序导出报告为 Microsoft Excel 文档格式。
Aspose.Cells for JasperReports 提供的演示是标准的 JasperReports 演示,修改后演示了新导出器的使用。
运行 Aspose.Cells for JasperReports 演示,执行以下步骤:
- Download JasperReports (e.g https://sourceforge.net/projects/jasperreports/files/archive/). Make sure to download the entire archived project with the source code and demos, not just a single JAR.
- 将归档项目解压到硬盘上的某个位置,例如C:\。
- Copy all demo folders from the \demo folder of Aspose.Cells.JasperReports.zip to <InstallDir>\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.
- Copy aspose.cells.jasperreports.jar from the \lib folder of Aspose.Cells.JasperReports.zip to <InstallDir>\lib.
- Prepare Ant Build Tool and Ivy Dependency Manager, see <InstallDir>\readme.txt.
- Modify the build.xml at <InstallDir>\demo\samples, add the aspose.cells.jasperreports.jar into the classpath: <path id=“project-classpath”> … <pathelement location="../../lib/aspose.cells.jasperreports.jar"/> .
- Change the current directory to <InstallDir>\demo\hsqldb and run the following command line: ant runServer
- Change the current directory to one of the Aspose.Cells for JasperReports demos, for example <InstallDir>\demo\samples\ac.charts and run the following commands in the command line: ant test - 使用Aspose XLS导出器生成报表文件。
- Open one of the resulting documents to view, for example <InstallDir>\demo\samples\ac.charts\build\reports\AreaChartReport.xls in Microsoft Excel or another application.