cuiyi's blog(崔毅 crazycy)

记录点滴 鉴往事之得失 以资于发展
数据加载中……

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

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
    
   

posted on 2007-07-27 12:19 crazycy 阅读(14871) 评论(6)  编辑  收藏 所属分类: JavaEE技术

评论

# re: 苦不堪言,iReport + JasperReports项目中的历练  回复  更多评论   

不知道 iReport 现在可以实现交叉报表了没
2007-07-27 13:36 | tonyzhou00

# re: 苦不堪言,iReport + JasperReports项目中的历练  回复  更多评论   

我在一个项目中用了这种打印方式,总感觉他有太多的缺陷,可能是因为我没有研究好吧,总会有有些想实现的效果却不能实现,比方说父报表怎么根据子报表大小来动态分配高度。
做页面也挺麻烦的,感觉不如手写页面快。
不过他的分页功能确实牛,自动分页,页面也非常容易维护。
2007-07-27 13:55 | 杨爱友

# re: 苦不堪言,iReport + JasperReports项目中的历练  回复  更多评论   

用了大量的Chinglish啊
2007-07-27 17:52 | leekiang

# re: 苦不堪言,iReport + JasperReports项目中的历练  回复  更多评论   

@tonyzhou00
早就可以实现了..
2007-07-28 15:19 | 有猫相伴的日子

# re: 苦不堪言,iReport + JasperReports项目中的历练  回复  更多评论   

请教一个问题,我现在也在用iReport + JasperReports,怎么样把循环输入的数据输出到头表格中,在简单些,在iReport + JasperReports中如何使用表格,我是刚毕业的,能不能指点一下呀,谢谢了
2007-07-30 12:45 | 我是菜鸟

# re: 苦不堪言,iReport + JasperReports项目中的历练[未登录]  回复  更多评论   

hi
我现在是同样的问题。。设置outflow有的内容长的还能换行显示 有的短的居然都不换行了 然后设置print when details overflow ;stretch overflow
都没有用的。。。由于是字段自然不能column
不知道楼主有什么好的建议or else
2009-10-30 18:35 | yang

只有注册用户登录后才能发表评论。


网站导航: