苦不堪言,iReport + JasperReports项目中的历练

本文分享了使用iReport和JasperReports开发报表时遇到的问题及解决方案,包括调整字段大小、改变评估时间等方法来解决字段无法正常显示的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

JasperReports 这个东西,是个好东西,iReport这个东西,也是个好东西;就是iReport这个东西,给我很多启示,关于sql组件,虽最终未必可行,目前处于验证进程。

话说使用iReport+JasperReports开发报表的曾经的尴尬,testing during development and testing on local machine, the report pdf displays well, so good job have done, but when demo in customer locale, a lot of fields cannot be displayed(不能显示了!)。

After a lot of time trying, almost every  options  supplied  have been tried in checked way and unchecked way, the well fields displayed accordingly, I have got some ideas:

1) cannot display(不能显示), but other field with same content can display , why?
    OK, the size is too small(把字符框的 大小设置大一些),then well done.、

2)some field cannot display
     process: I found these undisplayed is  in header,  then I copy them to footer,  what's the result? display well in footer, but no display in header.
     then I change the "evaluation time" from "now" to "column"
     well done!
    but be careful, fields valued $F cannot be column, for it cannot be displayed

3) some field cannot be display  corresponding to  2)
    why they cannot be displayed  in both  header and  footer?
    oh, I found most field have the "stretch with overflow" option checked, so I added, so cool

******************************************************
this problem I found explation when I solved on net
iReport stretch 选项的注意
Text Field有一选项为Stretch with overflow。 作用是动态的伸展文字所占的空间。
要注意一点是Stretch是跟据Font Name的体字像数为基准进行伸展的。所以当我们输出PDF格式时要注意PDF Font Name 与Font Name是否一致。如不一致在文字量多的时候会出现少了或多了显示空间的问题
iReport Band的[Split allowed]属性
Split allowed是允许分开的意思。以页为单位,被分离出去的是Band内的所有内容。如果剩下的页面空间不够显示Band的内容。那么Band的内容会显示在下一页。

ireport有时侯不能显示数据库中数据的解决方式:
  1)每一个element:设置:print when details overflow ;stretch overflow
  2)字段高度不够
******************************************************
all resolved, the boss smiled, and happy back from customer
    
   

132740.html

crazycy 2007-07-27 12:19 发表评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值