JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Java Tools  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友   
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 Re:JasperReport 求救 [Re:hellojavas]
hidylan





發文: 36
積分: 0
於 2005-11-17 10:37 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
小桃子你的問題解決了嗎?
我一開始也是出現了相同的問題,最後解決的方法是類別庫要多加一個jdt-compiler.jar,就可以順利產生PDF檔了,可能我用的是iReport0.5.2的版本吧。


reply to postreply to post
作者 Re:JasperReport 求救 [Re:小桃子]
sunshift





發文: 1
積分: 0
於 2005-12-02 17:42 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
小桃子 wrote:
有一個問題想要請教一下..?

我照著之前那個教學的PDF的作法,單單用IReport作報表..轉成PDF檔都OK...

但是用到JBuilderX中後..就會出現錯誤...
出現錯誤的是這一行
1
2
3
4
5
6
7
8
9
10
Connection conn = this.createConnection(); //建立資料庫連線
  try {
  Statement stm = conn.createStatement();
  ResultSet rs = stm.executeQuery(sql);
  fileName = "C:\\iReport-0.4.1\\test.jasper";
  JasperFillManager.fillReportToFile(fileName,parameters,new JRResultSetDataSource(rs));   //這一行出錯
  fileName = "C:\\iReport-0.4.1\\test.jrprint";
  JasperExportManager.exportReportToPdfFile(fileName);
  }
 

錯誤訊息是:"java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/env/INameEnvironment"

我找不到相關的錯誤資料..你各位大大指教....


应该是你没有加载jdt-compiler.jar这个文件,在ireport\lib目录下


reply to postreply to post
作者 Re:JasperReport 求救 [Re:hellojavas]
susancai





發文: 4
積分: 0
於 2006-01-19 09:09 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我也碰到和小桃子類似的問題。

我在 iReport 0.5.3 中做了個報表﹐解壓以後﹐運行 IREPORT。BAT﹐ 然後設計報表。可是﹐當我要編譯COMPILE 它的時候﹐出錯。

猜想是路徑問題。可是jdt-compiler.jar 已經在 \iReport-0.5.3\lib\ 裡。把它放進jre\lib\ext\ 或 jdk\lib 裡﹐也沒有用。 還是出錯。

classpath = JAVA_HOME\bin; JAVA_HOME\lib\*.jar;c:\java\iReport\bin;c:\java\iReport\lib\*.jar;c:\sql\bin\;

哪位高手請不吝賜教﹗先行謝謝﹗

run iReport\ireport.bat, save its trail as attached.

錯誤信息如下﹕

Compiling to file... CurrencyByPeriod.jasper -> CurrencyByPeriod.java

Error compiling the report java source! java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/env/INameEnvironment
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at it.businesslogic.ireport.IReportCompiler.class$(IReportCompiler.java:1326)
at it.businesslogic.ireport.IReportCompiler.getClassLoader(IReportCompiler.java:1326)
at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:461)
at java.lang.Thread.run(Unknown Source)
Compilation running time : 3

iReportTrail.txt (18.41k)


susancai edited on 2006-01-23 13:41
reply to postreply to post
susan
作者 Re:JasperReport 求救 [Re:hellojavas]
susancai





發文: 4
積分: 0
於 2006-02-01 15:07 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我解決了這個問題。 原來必須把JDK 和 JRE 放在同一個folder.

reply to postreply to post
作者 Re:JasperReport 求救 [Re:hellojavas]
unsoso





發文: 2
積分: 0
於 2006-08-07 17:59 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
請問一下...如果用了subreport來做兩個以上的獨立SQL的話,請問有指令可以在SERVLET中將其RS帶入其SUBREPORT中嘛?試了好久,希望有那位大大可以給點意見

reply to postreply to post
作者 Re:JasperReport 求救 [Re:unsoso]
RR

~Nintendo64~



發文: 686
積分: 3
於 2006-08-07 18:17 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
unsoso wrote:
請問一下...如果用了subreport來做兩個以上的獨立SQL的話,請問有指令可以在SERVLET中將其RS帶入其SUBREPORT中嘛?試了好久,希望有那位大大可以給點意見

有使用到subreport的話請傳入connection,不要用ResultSet
不然子表吃不到connection...


reply to postreply to post

Focus TDCi Powershift,純正德國血統
作者 Re:JasperReport 求救 [Re:RR]
unsoso





發文: 2
積分: 0
於 2006-08-07 18:40 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
RR wrote:
有使用到subreport的話請傳入connection,不要用ResultSet
不然子表吃不到connection...

那在請問一下
JasperFillManager.fillReportToFile(fileName,parameters, new JRResultSetDataSource(null));
我是用此方法把值傳進去ireport裡,讓他產生jrprint在囀成pdf
1.今天我不能在ireport上寫jdbc讓它去連並下sql指令(分散氏資料庫)
,所以不之道該如何下這connection指令並傳到subreport中
如果是我誤會大大意思...請大大指教


reply to postreply to post
作者 Re:JasperReport 求救 [Re:unsoso]
RR

~Nintendo64~



發文: 686
積分: 3
於 2006-08-09 11:18 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
unsoso wrote:
那在請問一下
JasperFillManager.fillReportToFile(fileName,parameters, new JRResultSetDataSource(null));
我是用此方法把值傳進去ireport裡,讓他產生jrprint在囀成pdf
1.今天我不能在ireport上寫jdbc讓它去連並下sql指令(分散氏資料庫)
,所以不之道該如何下這connection指令並傳到subreport中
如果是我誤會大大意思...請大大指教

1
JasperFillManager.fillReportToFile(fileName,parameters, connection);


2006/08/21補充:
之前沒看到您是提分散式資料庫
如果是這樣的話應該用Bean或是DataSource的方式提供報表資料。


RR edited on 2006-08-21 15:32
reply to postreply to post

Focus TDCi Powershift,純正德國血統
作者 Re:JasperReport 求救 [Re:tyujeng]
cloudcck





發文: 22
積分: 0
於 2007-08-23 11:02 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我也有同樣的問題

公司的報表是用Swing的AbstractTableModel

在執行
byte [] bytes = JasperRunManager.runReportToPdf(jasperReport,  parameters, new JRTableModelDataSource(ntm));

出現
java.lang.NoClassDefFoundError: dori/jasper/engine/fill/JRVerticalFiller

而我去查找
/WEB-INF/lib 底下的jar檔
也都有
jasperreports-0.5.0.jar

另外jdt-compiler.jar檔,我下載了jasperreports-0.5.0-project 也沒有看到耶
這個問題,找了好多天了,一直抓不出解決方法,有大大可以幫忙嗎?

PS:
目前的環境是
IBM WebShpere 5.0
Jasperreport版本是 0.5.0


cloudcck edited on 2007-08-23 11:14
reply to postreply to post
作者 Re:JasperReport 求救 [Re:cloudcck]
cloudcck





發文: 22
積分: 0
於 2007-08-24 15:27 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
jdt-compiler-3.1.1 也放上去了

在AIX啟動JVM時,也有帶入
-Djava.awt.headless=true

還是不行.....

有人有遇過同樣的問題嗎 ?

Sad


reply to postreply to post
作者 Re:JasperReport 求救 [Re:tyujeng]
huahuayi





發文: 1
積分: 0
於 2008-12-25 16:26 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我怎么看不到大家关于问题的解答啊

reply to postreply to post
作者 Re:JasperReport 求救 [Re:hellojavas]
xdfu





發文: 11
積分: 0
於 2010-11-30 16:27 user profilesend a private message to usersend email to xdfureply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
謝謝大大的分享,剛入職場,就要先寫ireport,正研究中,謝謝唷。

reply to postreply to post
go to first page go to previous page  1   2   3  go to next page go to last page
» JWorld@TW »  Java Tools

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8