JasperReport的demo的使用

一、下载、编译jasperreports

1.下载jasperreports-6.5.1-project.zip

https://community.jaspersoft.com/project/jasperreports-library/releases

解压到D:\program,切换到demo目录,执行ant

D:\program\report\jasperreports\jasperreports-6.5.1\demo\samples>ant

This appears to be an antlib declaration.
Action: Check that the implementing library exists in one of:
        -D:\Program Files\apache-ant-1.10.3\lib
        -C:\Users\ShaoRongFan\.ant\lib
        -a directory added on the command line with the -lib argument


Total time: 0 seconds

2.下载apache-ivy-2.5.0-rc1-bin.zip

https://ant.apache.org/ivy/download.cgi

解压将ivy-2.5.0-rc1.jar放到ant的lib目录,再次执行ant,在sapmples目录执行很慢,进入示例目录单个执行

D:\program\report\jasperreports\jasperreports-6.5.1\demo\samples\alterdesign>an
t

 

 

3.查看ant viewDesign

4.导入代码到Jaspersoft Studio-6.6.0

添加JasperReports Libraries、JasperReports Library Dependencies、JasperReports Server Library到path

运行AlterDesignApp的main方法

build下reports目录将生成AlterDesignReport.jrprint和AlterDesignReport.pdf

运行BarbecueApp

拷贝BarbecueApp.java到src目录,BarbecueReport.jasper到build下reports目录

添加commons-codec-1.9.jar到build path

run configurations添加参数test,运行

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值