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

yurish

Members
  • Posts

    38
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by yurish

  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
  14. aegwyn42, i have one question. My report is taking data from database. Data is like: Code:ID Name Surname Company 1 Ralph Schumacher BMW 2 Michael Schumacher Ferrari 3 Kimi Raikonnen McLaren 4 Mika Hakkinen Mclaren 5 Rubens Barrichelo Ferrari I want my report look like table: Code:[code] |Name|Surname|ID| |Company|____|_______|__| For example: Code:[code]Ferrari Michael Schumacher 2 Rubens Barrichelo 5 Mclaren Kimi Raikonnen 3 Mika Hakkinen 4 BMW Ralph Schumacher 1 In my previous reports i uzsed crosstab, but i hadn't data from database in cells, i had count variables, where data was generated by report itself. I tried to use crosstab in this report, but i can't place 3 and more columns in my crosstab(don't know why, i'm using 1.2.8 iReport with JasperReports 1.2.8.). I'm searching for another solution to my problem. I tried to create a group and reference it to company, but i get something like that: Code:[code]Ferrari Michael Schumacher 2 Mclaren Kimi Raikonnen 3 BMW Ralph Schumacher 1 My company field value is changing each time. Please, waiting for your help! Don't know how to thank you... Post edited by: yurish, at: 2007/09/17 14:45
  15. Oh my God! It works! Thanks! BIG Thanks to you! You saved my place at my work! =]
  16. I'm trying to make a report with a table, but i have no idea, how to make it! I tried to do it with crosstab, but there are several problems, which i can't solve. I need as measures 3 variables, which are string variables, and 3 static text headlines. When i'm trying to make it, each row starts with a headlines, which are not needed. I want to write headlines only once in a top of a table. I tried just to place this 3 fields with borders, but i can't make all row automatically resized, everything i gain is every cell resized depending on it's size. If you can tell me, how to, somehow, group them to one group and make so, that each row is resized, depending on the heighest cell. Please, help me with some ideas, how to make it. I'm trying since last week to make it. :unsure: :unsure: :unsure: :( :( :( :(
  17. I set following jars in my classpath: jasperreports-1.2.8-javaflow.jar jasperreports-1.2.8.jar jasperreports-1.2.8-applet.jar poi-2.0-final-10040126.jar(for Excel) commons-beanutils-1.5.jar commons-collections-2.1.jar commons-digester-1.7.jar commons-javaflow-20060411.jar commons-logging-1.0.2.jar itext-1.3.1.jar ojdbc14-10.2.0.3.jar(for database)
  18. Can i use ireport 2.0 with jasperreports 1.2.8? I am using jasperreports only for compiling and filling my reports with custom datasource.
  19. Is there some kind of table in ireport, but not a crosstab? I need to make a table, where it will be 3 columns. In crosstab i can make only 2 columns. When i add an extra column in crosstab through crosstab properties, ireport place it under my existing column. Don't know why it is so. So, is there any another table(not a crosstab, but also automatically resizable)? Or, how to add a column into a crosstab, where a new column will be placed near previously placed columns, but not under them?
  20. All fields have such property "PDF Encoding". Search it in Element properties ->All->PDF Encoding. Make encoding arabic, and it will go fine.
  21. I made my pdfstream like this: Code://sufficient code goes here ServletOutputStream servletOutputStream = res.getOutputStream(); //code for jasperReports like initialising jasperPrint... JasperExportManager.exportReportToPdfStream(jasperPrint, servletOutputStream); servletOutputStream.flush(); servletOutputStream.close(); //code ending
  22. Well, you can just add a clear field, like $F{COMMENTS} and send data via your Java app to that field. Something like this one: Code:public Object getFieldValue(JRField field) throws JRException { Object value = null; String fieldName = field.getName(); if ("COMMENTS".equals(fieldName)) { value = "usertyped text"; } Something like this. I'm new to JR, so don't know if it's correct. But idea is like i mentioned.
×
×
  • Create New...