cuiyi's blog(崔毅 crazycy)

          記錄點(diǎn)滴 鑒往事之得失 以資于發(fā)展
          數(shù)據(jù)加載中……

          苦不堪言,iReport + JasperReports項目中的歷練

          JasperReports 這個東西,是個好東西,iReport這個東西,也是個好東西;就是iReport這個東西,給我很多啟示,關(guān)于sql組件,雖最終未必可行,目前處于驗證進(jìn)程。

          話說使用iReport+JasperReports開發(fā)報表的曾經(jīng)的尷尬,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(把字符框的 大小設(shè)置大一些),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。 作用是動態(tài)的伸展文字所占的空間。
          要注意一點(diǎn)是Stretch是跟據(jù)Font Name的體字像數(shù)為基準(zhǔn)進(jìn)行伸展的。所以當(dāng)我們輸出PDF格式時要注意PDF Font Name 與Font Name是否一致。如不一致在文字量多的時候會出現(xiàn)少了或多了顯示空間的問題

          iReport Band的[Split allowed]屬性

          Split allowed是允許分開的意思。以頁為單位,被分離出去的是Band內(nèi)的所有內(nèi)容。如果剩下的頁面空間不夠顯示Band的內(nèi)容。那么Band的內(nèi)容會顯示在下一頁。

          ireport有時侯不能顯示數(shù)據(jù)庫中數(shù)據(jù)的解決方式:
            1)每一個element:設(shè)置: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 閱讀(14929) 評論(6)  編輯  收藏 所屬分類: JavaEE技術(shù)

          評論

          # re: 苦不堪言,iReport + JasperReports項目中的歷練  回復(fù)  更多評論   

          不知道 iReport 現(xiàn)在可以實(shí)現(xiàn)交叉報表了沒
          2007-07-27 13:36 | tonyzhou00

          # re: 苦不堪言,iReport + JasperReports項目中的歷練  回復(fù)  更多評論   

          我在一個項目中用了這種打印方式,總感覺他有太多的缺陷,可能是因為我沒有研究好吧,總會有有些想實(shí)現(xiàn)的效果卻不能實(shí)現(xiàn),比方說父報表怎么根據(jù)子報表大小來動態(tài)分配高度。
          做頁面也挺麻煩的,感覺不如手寫頁面快。
          不過他的分頁功能確實(shí)牛,自動分頁,頁面也非常容易維護(hù)。
          2007-07-27 13:55 | 楊愛友

          # re: 苦不堪言,iReport + JasperReports項目中的歷練  回復(fù)  更多評論   

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

          # re: 苦不堪言,iReport + JasperReports項目中的歷練  回復(fù)  更多評論   

          @tonyzhou00
          早就可以實(shí)現(xiàn)了..
          2007-07-28 15:19 | 有貓相伴的日子

          # re: 苦不堪言,iReport + JasperReports項目中的歷練  回復(fù)  更多評論   

          請教一個問題,我現(xiàn)在也在用iReport + JasperReports,怎么樣把循環(huán)輸入的數(shù)據(jù)輸出到頭表格中,在簡單些,在iReport + JasperReports中如何使用表格,我是剛畢業(yè)的,能不能指點(diǎn)一下呀,謝謝了
          2007-07-30 12:45 | 我是菜鳥

          # re: 苦不堪言,iReport + JasperReports項目中的歷練[未登錄]  回復(fù)  更多評論   

          hi
          我現(xiàn)在是同樣的問題。。設(shè)置outflow有的內(nèi)容長的還能換行顯示 有的短的居然都不換行了 然后設(shè)置print when details overflow ;stretch overflow
          都沒有用的。。。由于是字段自然不能column
          不知道樓主有什么好的建議or else
          2009-10-30 18:35 | yang
          主站蜘蛛池模板: 万宁市| 台东县| 罗城| 黔东| 轮台县| 铁力市| 巧家县| 肃北| 溧阳市| 盱眙县| 贵溪市| 淮安市| 延吉市| 古田县| 喜德县| 大渡口区| 方正县| 海原县| 琼海市| 威海市| 东台市| 阿图什市| 伽师县| 四会市| 海宁市| 察哈| 武鸣县| 海安县| 雷波县| 藁城市| 宾阳县| 天祝| 吉水县| 沙坪坝区| 都安| 平定县| 凤台县| 乌什县| 集贤县| 达拉特旗| 永春县|