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

ns69

Members
  • Posts

    18
  • Joined

  • Last visited

ns69's Achievements

Apprentice

Apprentice (3/14)

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

Recent Badges

0

Reputation

  1. Also try this: Code:exporter.setParameter(net.sf.jasperreports.engine.export.JRXlsExporterParameter.IS_COLLAPSE_ROW_SPAN, Boolean.TRUE);
  2. Sorry, my bad. Try and change the vertical align to "Top" and see if that helps.
  3. I am using MS Office Word 2003 SP3. As you can see from my code I am just initializing the response objrct content type to word application to open the .rtf file (created by JR) in the client browser window. Sorry for the confusion. Thanks a lot for all your help. Regards, Neeta
  4. You are right the rtf file was opened by the word application and saved. Here is the rtf file generated by JR. You will also find the .jrxml file as attachment created in iReport. I have also included the java code for your review. Thanks, NS. Code: public static void genWordReport(JasperPrint jasperPrint, HttpServletResponse response, OutputStream ouputStream, String saveAsName){ try{ response.reset(); // response.setHeader("Expires", "0"«»); //response.setHeader("Content-Disposition", "inline;filename=" + saveAsName.concat(".doc"«»)); response.setHeader("Content-Disposition", "attachment;filename=" + saveAsName.concat(".rtf"«»)); response.setContentType("application/ms-word"«»); response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0"«»); response.setHeader("Pragma", "public"«»); net.sf.jasperreports.engine.export.JRRtfExporter exporter = new net.sf.jasperreports.engine.export.JRRtfExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, saveAsName.concat(".doc"«»)); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream); exporter.setParameter(JRExporterParameter.OFFSET_X, new Integer(20)); exporter.setParameter(JRExporterParameter.OFFSET_Y, new Integer(15)); exporter.exportReport(); } catch(Exception er){ String connectMsg = "Could not create the Word report " + er.getMessage() + " " + er.getLocalizedMessage(); System.out.println(connectMsg); } } [file name=testrep.zip size=25634]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/testrep.zip[/file]
  5. I too had the same problem. I used the following code before calling the exporter.exportReport() function. Hope this solves your problem too. Please let me know if it worked or not. Code:exporter.setParameter(net.sf.jasperreports.engine.export.JRXlsExporterParameter.IS_FONT_SIZE_FIX_ENABLED,Boolean.TRUE);
  6. Srikanth, The borders around the report elements appear only in the word format. The other formats are without any borders. Thanks, Neeta
  7. attachment [file name=test-17d2c6a68ac58c45a45eff280833c37b.zip size=83354]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/test-17d2c6a68ac58c45a45eff280833c37b.zip[/file]
  8. Hi Teodar, As per your earlier response in the other thread, I am uploading the RTF file for your reference. Thanks, NS
  9. teodord wrote: Hi, If you can attach such an RTF file to this post, maybe we can help. Actually, creating a different message thread would be better. Thank you, Teodor Actually there is a thread that I created sometime back, please goto http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=8&id=36417#36417 . I will also upload the RTF file in that thread. Thanks, NS
  10. Yes, you were right, the issue of opening of the word and excel formats is not related to JR. I found a solution to the problem, just changed the open options for file types. My Computer --> Tools --> Folder Options --> File Types --> Advanced and make sure only one checkbox is checked i.e., "Browse in same window". Thanks Teodor for all your help. On a side note any ideas for how to get rid of the boxes around the report elements in the word format? Regards, NS
  11. Hi Teodor, Thanks for the reply. I tested the reports using Mozilla FireFox browser and they work fine as expected. About the reports behavior on different machine configuration, I am seeing the same issue with only IE on all my colleagues machines too. And the strange thing is there is no issue when I open pdf and then word format. So my thoughts are JR on IE browser with the Microsoft Office application is causing this problem. Regards, NS.
  12. Anybody, please I need a solution for this problem!! Jasper Gurus out there, please help me. Thanks, Neeta
  13. I developed the reports -- PDF, Word and Excel formats for my web application using JasperReports. From the main jsp page when the user clicks one of these formats, it opens another window and displays the report in that window. But when I open the word and then excel format one after another without closing the reports window, for the excel format it makes a sound as if it want to download and the reports window in the background closes and nothing happens. I am using IE. Has anybody encountered the same issue? JasperReports Gurus, any ideas how to fix this problem? Thanks, NS.
  14. In the first report, you can try using the compiled reports (*.jasper files), instead of .JRXML files. In the code below the reportFile is pointing to the *.jasper file. Here is the code that I used: JasperReport jasperReport = (JasperReport) JRLoader.loadObject(reportFile); JasperPrint jasperPrint = net.sf.jasperreports.engine.JasperFillManager.fillReport(jasperReport, parametermap, new net.sf.jasperreports.engine.JRResultSetDataSource(rs)); Good luck!!
  15. I am getting an extra blank page at the end of the excel report format, the other formats like word and pdf are just fine. Can anyone, please look into the attached .jrxml and let me know what's causing this? [file name=stopLight.jrxml size=13638]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/stopLight.jrxml[/file]
×
×
  • Create New...