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

logudotcom

Members
  • Posts

    21
  • Joined

  • Last visited

logudotcom'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. but it is printing well in the pdf ... only problem in the .doc.... i checked the french texts...it is fine as the text..
  2. i have jasper reports to create the .rtf/.docs. when i produce the reports with french chars.. it displays as special chars .... (i think it is accent problem)... any possible solutions to that. my actual code: --------------------- In, Tomcat, I use to save the report in .rtf file and from java. I read the text and i display in the browser. When the tomcat is in windows OS, the french text in the .rtf report, is displayed as i give. But If the tomcat is in Linux OS, the same french text is displayed with some changes The Code for saving the report as .rtf ======================================= JasperPrint jasperPrint = JasperManager.fillReport(jasperReport,parameters,conn); JRRtfExporter rtfExporter = new JRRtfExporter(); rtfExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); rtfExporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, request.getRealPath("includes")+"/report.rtf"); rtfExporter.exportReport(); So now the report is saved as report.doc And I read the document and display it. For that code is ======================================================== response.setHeader ("Content-Disposition", "attachment;filename="Report.rtf""); File f = new File("report.doc"); InputStream in = new FileInputStream(f); ServletOutputStream outs = response.getOutputStream(); int bit = 256; int i = 0; try { while ((bit) >= 0) { bit = in.read(); outs.write(bit); } } catch (IOException ioe) { ioe.printStackTrace(System.out); } outs.flush(); outs.close(); in.close();
  3. Hallo Firends Please help me regarding this problem I use jasper report for report in my web project (Tomcat). I use to save the report in .rtf file and from java I read the text and i display in the browser. When the tomcat is in windows OS, the french text in the .rtf report is displayed as i give. But If the tomcat is in Linux OS, the same french text is displayed with some changes The Code for saving the report as .rtf ======================================= JasperPrint jasperPrint = JasperManager.fillReport(jasperReport,parameters,conn); JRRtfExporter rtfExporter = new JRRtfExporter(); rtfExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); rtfExporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, request.getRealPath("includes")+"/report.rtf"); rtfExporter.exportReport(); So now the report is saved as report.doc And I read the document and display it. For that code is ======================================================== response.setHeader ("Content-Disposition", "attachment;filename="Report.rtf""); File f = new File("report.doc"); InputStream in = new FileInputStream(f); ServletOutputStream outs = response.getOutputStream(); int bit = 256; int i = 0; try { while ((bit) >= 0) { bit = in.read(); outs.write(bit); } } catch (IOException ioe) { ioe.printStackTrace(System.out); } outs.flush(); outs.close(); in.close(); Is there any possible to solve this problem. Is so kindly let us know. Thanks in advance...
  4. hi, recently i have generated the ms-word .doc report using iReport .... if i open in ms-word and modify the alignment ... i could not it is displayed as object ... how to customize it..
  5. Hi, I have used iRepor & Jasper Tool to create the reports as .doc formatted.. it is created well... after exporting to Ms-word or .doc report... When I edit in the created .doc report... it is selected as object (I could not use Normal Ms-Word properties) as I have inserted in the reports.. how to avoid this? Kindly help...
  6. Hi All I have used iReport to design my report and used in my java file to export the dynamic report... when i export the report.... i get fixed lenght text for descritpion, detials and few more text area fields... how to allow as much text in the pdf location ... (as when they enter as much text in the text that to be printed the pdf column? can anyone help me on this. Regards, Logu
  7. I have a problem in loading jasper (PDF) report. I load PDF report from jsp.The report is loaded but the content is not shown only in Internet Explorer. When I press F5 key the content is shown.But in all the browsers like (Firefox,Opera,Netscape) it works very well.Is that problem with Internet Explorer are Jasper report or Jsp Coding The following is the coding which I used load the jasper report URL url = new URL("file:"+servlet.getServletContext().getRealPath("reports")+"/sales/sales_month.jasper"); response.setContentType("application/pdf"); InputStream inputSt = url.openStream(); InputStream reportStream = inputSt; JRBeanArrayDataSource beanCollectionDataSource = new JRBeanArrayDataSource(salesvalue); JasperRunManager.runReportToPdfStream(reportStream, servletOutputStream, p, beanCollectionDataSource); servletOutputStream.flush(); servletOutputStream.close();
  8. Dear All, i have been using jasper report for a project. i did not write query in report query or query string(jasper report) instead query is constructed in java page and result is passed as a arraylist to the report to show the report i use acrobat reader. when i load the answer to the acrobat reader5.0 the result is not shown until i refresh the page but i can get the result in the first time itself. when i use acrobat reader version 6.0 and the above. so plz can any one say wheather it is a problem in version or the code need to be changed. the code is as follows. ServletOutputStream servletOutputStream = response.getOutputStream(); URL url = ClassLoader.getSystemResource ( "file:" + servlet.getServletContext ( ).getRealPath ( "reports" ) + "/sponsor/PrintLabel.jasper" ); if ( url == null ) url = new URL ( "file:" + servlet.getServletContext ( ) .getRealPath ( "reports" ) + "/sponsor/PrintLabel.jasper" ); response.setContentType ( "application/pdf" ); InputStream inputSt = url.openStream ( ); InputStream reportStream = inputSt; Sponsor[] spo=(Sponsor[]) listLabel.toArray(new Sponsor[0]); JRBeanArrayDataSource beanCollectionDataSource = new JRBeanArrayDataSource ( ( spo ) ); JasperRunManager.runReportToPdfStream ( reportStream , servletOutputStream , new HashMap ( ) , beanCollectionDataSource ); servletOutputStream.flush ( ); servletOutputStream.close ( );
  9. can you give me in details? i tried that it is not help ful to ..? please give me in deatils we can use different db data source and connect the reports...
  10. I need to connect multiple database in a single report.Is it possible to connect multiple database for single report? If so explain
  11. When I execute Jasper Report through the application (JSP) the report is not working i receive the following error 18:47:15,937 ERROR [[action]] Servlet.service() for servlet action threw exception java.lang.IllegalStateException: Cannot forward after response has been committed
  12. I have to connect multi database for one report in my project. Is that possible to do in jasper report? If possible, plz explain me how to do it.
  13. In Jasper Report I had to take values from two tables with two quesries.But these two queries are releted one another for example Table 1: School, School Id, School Name Table 2: Student, Student Id, Student Name, School Id Now I need to report Like this, School Name Student Names St. Thomas's School - Ram Prasad St. Paul's School - Vinoth Xavier St. Mullers School - Loganathan, loguKK How to take report in jasper or How to write query in jasper.
  14. The Error produced like : Exception :net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. java.lang.Integer cannot be resolved or is not a type value = (java.lang.Integer)(new Integer(1)); <---------------> In jasper report, the report is generated. but it is not in the case of having interface and generating the report what is the reason?
  15. How to use dynamic queries in jasper reports while using java application
×
×
  • Create New...