Jump to content
We've recently updated our Privacy Statement, available here ×

yurish

Members
  • Posts

    38
  • Joined

  • Last visited

yurish's Achievements

Contributor

Contributor (5/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. You are getting pdf file, which is displayed in browser like text-plain. Try my code: Code:JasperDesign jasperDesign = JRXmlLoader.load(jrxmlDir+jrxml); JasperCompileManager.compileReportToFile(jasperDesign,fileName); InputStream fileStream =new DataInputStream(new FileInputStream(fileName)); JasperRunManager.runReportToPdfStream(fileStream, servletOutputStream, map, dataSource); fileStream.close(); servletOutputStream.flush(); servletOutputStream.close(); fileName is *.jasper file.
  2. Every element in jrxml have it's own PDF encoding. If you generate jrxml using iReport, you can find it, where i said to find it.
  3. Have you set PDF encoding in your jrxml? For every element in report you must set Japanese PDF encoding. This can be set in Elemnt properties -> Font -> PDF encoding. There are 4 different Japanese encodings.
  4. I don't know how to reproduce this. Now i set Code:Thread.sleep(1000) to my code. Everything is fine. Mb some king of bug, cause i'm not using the last version of JasperReports. Now it is fine. Conf of our application is: Java 1.4.2 Struts Framework 1.1 Jasperreports 1.2.8 iReport 1.2.8 IE6
  5. If you are using jBoss, you can let him take more memory. I had this error several times, when i have too big amount of data. Add in run.bat -Xmx400m this one. You will let jBoss take 400 mB of memory.
  6. Thank's for reply, Lucian! I'm using IE6, but in firefox2 there is the same problem. While writing small static PDF in response, problem doesn't exist.
  7. As far as i'm concerned, when isDataPreSorted flag is turned on, data will be sorted as it is in resultset. I'm using customdatasource, and when i need another sorting, than in alphabetical order(for example UTF-8 and another language, i sort my data in SQL.
  8. Seems like you have an object "pen", which is not in your report. Can you post your jrxml code?
  9. It is strange, but when i added Thread.sleep(1000); in to my code after runReportToPdfStream, everything works. Why do i need to give system some time, when i have very small reports?
  10. Tried to close filestream before i'm closing outputstream. Seem's logically. And works fine. Don't know how it would be in future. But now works. Thanks anyway. =] ;)
  11. Forgot to mention, no exception is there. Using 1.4 java, jasperreports 1.2.8 and struts framework.
  12. I'm generating reports with runReportToPdfStream method. When i'm debugging, everything is ok, but when i'm just executing my code, i can't get my report(The page cannot be displayed). I discovered, that this thing happens, when my report is very small(4 kB ). Any suggestions, what that might be? With large reports everything ok. Looks like code in streaming is executing before report runs. Code:jasperDesign = JRXmlLoader.load(jrxmlDir+jrxml); JasperCompileManager.compileReportToFile(jasperDesign,fileName); InputStream fileStream =new DataInputStream(new FileInputStream(fileName)); JasperRunManager.runReportToPdfStream(fileStream, servletOutputStream, map, dataSource); servletOutputStream.flush(); servletOutputStream.close(); fileStream.close(); File file = new File(fileName); file.delete(); variable filename is .jasper file. Help? :blush: :unsure: :unsure:
  13. Try to read examples givven with this program and read some links: 1) http://ireport.sourceforge.net/tutorial1.html 2) http://www.cise.ufl.edu/~otopsaka/CIS4301/ReportDemo/PrepareAReport.html 3) http://www.devx.com/Java/Article/29309
×
×
  • Create New...