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

Nick

Members
  • Posts

    17
  • 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 Nick

  1. Thanks for your replays jjjj and jcoto. - I'm still trying to implement jjjj's solution cause I was using a jsp page to generate the pdf report. I'm trying use a servlet instead. - I had already tried upgrading the AcrobatReader version. As you said jcoto, it works. But I have many users for my web application here in La Paz city and other cities too. So it's not a easy way to solve my problem. Also, it seems JasperReports has a bug here because it depends of the user layer software. Regards, Nick.
  2. Try setting a query in your master report. Then the subreport will be generated the same number of rows in the query result set. Also, try changing the some settings in the tutorial subreport sample. Hope this helps.
  3. May you use somethig like this Code:$V{B} != 0 ? $V{A}/$V{B} * 100 : $V{some_other_value}
  4. Hi jjjj! I'm starting to learn all of this things. Could you add the code I have to put in the web.xml file of my application, please? Thanks for your help!
  5. Put the subreport in the summary band instead the detail band. That has to work. I think you can put a sub-report in the detail band only if you are setting one or more subreport parameters with a field result from a query in the master report (I'd like somebody else confirm this). Hope this helps.
  6. Hi! Sorry, not sure about what you want to know. Like I said before, I use a outputStream to show the generated report in pdf format, because I don't want to create a file for each generated report (that's no efficient I think). May I forgot saying that when I get a blank page (instead of my report), I press F5 button to refresh the blank page and the report appears, but that's not a the true solution, right? Anyway, that means that the jasper is compiled and generated correctly, but it is not showed when I export it. Also, the report query can return from just one row to hundreds of rows. I'm almost sure that I have a blank page as result when the query returns a small number of rows, so the pdf result size is small too. I mean that the IExplorer or the Acrobat has a kind of bug when I try to show a small size file in a outputStream. May I have to set another parameter in the code posted before. I'll appreciate your help! Pd. So sorry about my english language.
  7. Hi guys! I've got a problem when I export a report to pdf in my web app. I've tried using two different codes: The first code (copied from the samples in the JasperReports project home site) was: Code:File reportFile = new File(application.getRealPath("/reportes/reporteDeIngresosCiudad.jasper"«»)); JasperPrint jasperPrint = JasperFillManager.fillReport(new FileInputStream(reportFile), parameters, conn); JRPdfExporter exporterPdf = new JRPdfExporter(); response.setContentType("application/pdf"«»); ServletOutputStream outputStream = response.getOutputStream(); exporterPdf.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporterPdf.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream); exporterPdf.exportReport(); outputStream.flush(); outputStream.close();And the second code (copied from the forum and currently used) is: Code:[code]File reportFile = new File(application.getRealPath("/reportes/reporteDeIngresosCiudad.jasper"«»)); JasperPrint jasperPrint = JasperFillManager.fillReport(new FileInputStream(reportFile), parameters, conn); byte[] bytes = JasperExportManager.exportReportToPdf(jasperPrint); response.setContentType("application/pdf"«»); response.setContentLength(bytes.length); ServletOutputStream outputStream = response.getOutputStream(); outputStream.write(bytes, 0, bytes.length); outputStream.flush(); outputStream.close();The codes works fine, but when the result pdf file has a small size (I think) the result page is blank. Pd. I'm using: iReports 1.2.7; JDeveloper 10.1.2; Acrobat Reader 5.0; Internet Explorer 6 Please help me.
  8. Hi everyone! I really hope you can help me with this problem. I export my report to pdf format in a web app. Everything was working fine but sometimes the exported report shows blank until I refresh the internet explorer. I think it's a problem with the jasper because it happens when the sql query in the report returns no rows. I have set the report propertie 'When no data' with the value 'AllSectionsNoDetail' because it shows important data in the title band. The code I use to export the report is: Code: JRPdfExporter exporterPdf = new JRPdfExporter(); response.setContentType("application/pdf"«»); ServletOutputStream outputStream = response.getOutputStream(); exporterPdf.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporterPdf.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream); exporterPdf.exportReport(); outputStream.flush(); outputStream.close(); Please, I really appreciate your help. Regards, Diego.
  9. Hi everyone! I really hope you can help me with this problem. I export my report to pdf format in a web app. Everything was working fine but sometimes the exported report shows blank until I refresh the internet explorer. I think it's a problem with the jasper because it happens when the sql query in the report returns no rows. I have set the report propertie 'When no data' with the value 'AllSectionsNoDetail' because it shows important data in the title band. The code I use to export the report is: Code: JRPdfExporter exporterPdf = new JRPdfExporter(); response.setContentType("application/pdf"«»); ServletOutputStream outputStream = response.getOutputStream(); exporterPdf.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporterPdf.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream); exporterPdf.exportReport(); outputStream.flush(); outputStream.close(); Please, I really appreciate your help. Regards, Diego.
  10. Hi! I'm working with iReports 1.2.7, it's all I need, except for a new requirement I have. I need to show the pdf exported reports with a determined zoom in my web app. Please, tell me if this tip has been implemented for the lastest iReports versions. Reading the 'iReport roject Home' http://jasperforge.org/sf/projects/ireport it seems there is still nothing about this. Any help will be appreciated. Regards, Diego Post edited by: Nick, at: 2007/03/07 21:30
  11. Hi ramilash! Could you tell me if your problem was solved? Please, help. I'm with a similar problem here. Thanks in advance, Diego
  12. Hi! In order to have an additional datasource I'm using a subdataset in my report. When I test the web application in my computer it works great, but when I upload the application to our oracle application server I have this error: Error compiling report java source files : /home/oracle/product/10.1.3.1/OracleAS_1/j2ee/home/report_1172506252776_460435.java /home/oracle/product/10.1.3.1/OracleAS_1/j2ee/home/report_SubDataset1_1172506252776_460435.java I compile the .jrxml file in the web application to generate a JasperReport object. I think I have to configure something in iReports or in JDeveloper, but I don't know what, please help me. Diego Pd. Using iReports 1.2.7 and JDeveloper 1.1.2 in my computer. The application server is Oracle AS. Post edited by: Nick, at: 2007/02/26 17:49
  13. I have found a way, I have to recompile the jrxml file but it works: Code:JasperReport jasperReport = JasperCompileManager.compileReport(application.getRealPath("/reportes/chart_example.jrxml"«»)); JRElement[] elementos = jasperReport.getSummary().getElements(); elementos[0].setWidth(500); jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn);I have just one element in the summary band: the chart. Hope this help anybody, Diego B) Pd. If you know a better way to do his please tell me. Post edited by: Nick, at: 2007/02/23 15:03
  14. Hi! I'm exporting my jreports to html format for a web application. In order to export them, I read de .jasper file and then fill it, something like: Code: File reportFile = new File(application.getRealPath("detalleDeLlamadas.jasper"«»)); jasperPrint = JasperFillManager.fillReport(new FileInputStream(reportFile), parameters, conn); Then I create a JRHtmlExporter, set its parameters and export the report without troubles: Code:[code] JRHtmlExporter exporter = new JRHtmlExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, application.getRealPath("/reports/ec" + d + ".html"«»)); exporter.setParameter(JRHtmlExporterParameter.SIZE_UNIT, JRHtmlExporterParameter.SIZE_UNIT_POINT); exporter.exportReport(); response.setContentType ("application/html"«»); I want to know when and how can I change the width property of a report element, especifically a chart. Before the filling or before the exporting? Do I have to use the jrxml file and compile it after set the width of the chart? Am I going by the right way to solve this problem? I'm using iReports 1.2.7 for the reports and jsp in JDeveloper for web application. Please help. Thanks, Diego Post edited by: Nick, at: 2007/02/23 13:25
  15. Hi, I'd like to know how to change the width of a chart dinamically. I have a line chart in wich I have to show a range of days in the category axis, and a total mount per day in the value axis. The user select the range of dates, so it can be a couple of days or a whole year. Trying to give a good appearance to the chart I'd like to change its width based on the dates range. Please, anybody, I need some tips 'cause I'm just a begginner in JasperReports. :whistle: Thanks, Diego. Post edited by: Dieguecito, at: 2007/02/02 15:23
  16. Hi dennistmh, I just can think in a servlet containing a variable where you will save the value you want to use later. I mean, for the first row use the AfterDetailEval method of the servlet to save the value you need in a variable in the servlet (remember the servlet is a class). Then for the next row use the BeforeDetailEval method to put the value in your servlet variable in a parameter in the report, and you've got it. I'm not a guru in JasperReport and don't know if there is a better way to do this, so I hope this helps. :whistle: Regards, Diego.
  17. Hi Andy. I have a similar problem here. Please, could you tell me how have you solve this problem? Regards, Diego
×
×
  • Create New...