当前位置:网站首页>Use of Jasper soft studio report tool and solution of thorny problems
Use of Jasper soft studio report tool and solution of thorny problems
2022-06-28 08:55:00 【Talent】
jasper soft studio The use of reporting tools and the resolution of thorny problems !
It has been half a year since bricks were moved , It's been a long time since Mi sent a new article. Let's do it today .
1、 It's easy to download and install , In addition, the functions of each part of the panel are relatively simple, which is directly omitted here .
2、 Change the font ( Chinese may not be displayed )
window -->> preference

Be careful : Font words need to search Baidu , The next step is java How to configure in .
<?xml version="1.0" encoding="UTF-8"?>
<fontFamilies>
<!--</fontFamily>-->
<fontFamily name=" Chinese Songti ">
<normal>fonts/stsong.TTF</normal>
<bold>fonts/stsong.TTF</bold>
<italic>fonts/stsong.TTF</italic>
<boldItalic>fonts/stsong.TTF</boldItalic>
<pdfEncoding>Identity-H</pdfEncoding>
<pdfEmbedded>true</pdfEmbedded>
<exportFonts>
<export key="net.sf.jasperreports.html">' Chinese Songti ', Arial, Helvetica, sans-serif</export>
<export key="net.sf.jasperreports.xhtml">' Chinese Songti ', Arial, Helvetica, sans-serif</export>
</exportFonts>
</fontFamily>
<fontFamily name=" Microsoft YaHei ">
<normal>fonts/msyh.TTF</normal>
<bold>fonts/msyh.TTF</bold>
<italic>fonts/msyh.TTF</italic>
<boldItalic>fonts/msyh.TTF</boldItalic>
<pdfEncoding>Identity-H</pdfEncoding>
<pdfEmbedded>true</pdfEmbedded>
<exportFonts>
<export key="net.sf.jasperreports.html">' Microsoft YaHei ', Arial, Helvetica, sans-serif</export>
<export key="net.sf.jasperreports.xhtml">' Microsoft YaHei ', Arial, Helvetica, sans-serif</export>
</exportFonts>
</fontFamily>
</fontFamilies>
3、 Database as data source .



Click on add Add data sources 

ClassPathResource resource = new ClassPathResource("pdf_template/print_test.jasper");
InputStream inputStream = resource.getInputStream();
ServletOutputStream outputStream = response.getOutputStream();
JasperRunManager.runReportToPdfStream(inputStream,outputStream,title,new JRBeanCollectionDataSource(list));
4、java bean data source 

Then select the jar Bag can
5、 Time 
6、 picture 

Square box 3 The content in :
new ByteArrayInputStream(java.util.Base64.getDecoder().decode($F{
pic}.getBytes()))
These problems are basically encountered , It's still a little difficult to use at first ; Come on, everyone! !
边栏推荐
- 【力扣10天SQL入门】Day4 组合查询 & 指定选取
- 电子元器件销售ERP管理系统哪个比较好?
- Tree
- [untitled]
- JMeter -- interface test 1
- Characteristics and prevention of electrical fire
- Application of current limiting protector in preventing electrical fire in shopping malls
- ffmpeg推流报错Failed to update header with correct duration.
- Discussion on the improvement and application of the prepayment system in the management of electricity charge and price
- Matlab tips (20) matrix analysis -- principal component regression
猜你喜欢

The Cassandra cluster reinstalls and starts from the node. An error is reported. There is an existing solution

Postman interface test

Kali installation configuration

rman备份报ORA-19809 ORA-19804

TCP那点事

罗氏线圈可以测量的大电流和频率范围

Protection range and optimization of motor protector for hoist equipment

STL - inverter

Infinite penetration test
![[.Net6] GRP server and client development cases, as well as the access efficiency duel between the minimum API service, GRP service and traditional webapi service](/img/19/296f124becb87461accf8b73b0a8bc.png)
[.Net6] GRP server and client development cases, as well as the access efficiency duel between the minimum API service, GRP service and traditional webapi service
随机推荐
中金财富开户安全吗?怎么收费?
Lilda low code data large screen, leveling the threshold of data application development
Chrome devtools
Zhejiang energy online monitoring and management system
containerd1.5.5的安装
Apiccloud, together with 360 Tianyu, helps enterprises keep the "first pass" of APP security
利尔达低代码数据大屏,铲平数据应用开发门槛
Fire fighting work and measures in Higher Vocational Colleges
Goldbach`s Conjecture
How to solve the problem of high concurrency and seckill
Is it safe to open an account for online stock speculation?
DEJA_VU3D - Cesium功能集 之 052-模拟卫星轨道(高空)效果
TCP
MATLAB小技巧(20)矩阵分析--主成分回归
RMAN backup message ora-19809 ora-19804
rman備份報ORA-19809 ORA-19804
Power data
Webrtc advantages and module splitting
Privacy computing fat----- offline prediction
STL - inverter