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

kanagarajaa

Members
  • Posts

    7
  • Joined

  • Last visited

kanagarajaa's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi Mohan I think,This code ll be help to you.. ResultSet rs=stmt.executeQuery(sql); JRResultSetDataSource obj = new JRResultSetDataSource(rs); File jrxmlpath = new File(request.getSession().getServletContext().getRealPath("/reports/"+jrxmlFileName+".jrxml")); JasperReport jasperReport = JasperCompileManager.compileReport(jrxmlpath.toString()); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, new HashMap(),obj); try { File pdfpath = new File(request.getSession().getServletContext().getRealPath("/web/reports/"+fileName+".pdf")); JasperExportManager.exportReportToPdfFile(jasperPrint,pdfpath.toString()); }catch(Exception e){ System.out.println(e); } i Hope i give solution to ur pbm Chears kanagaranan
  2. Hello raj, sorry,you didn't get my point correctly.Because In pdf file ,we can change pdf size at any level.But i need initially loaded pdf size to be 100% with out touching tools option.I need this to be done programmatically Thanks&Regards kanagarajan
  3. Hi, I am using jasper report to generate pdf file. It is working fine . When the report get generated the default pdf sizes 30% ,instead of i want the pdf size to be 100%. Any help would be greatly appreciated... Thanks Kanagarajaa
  4. Hi, I am also getting this problem.Could you find any solution about that? Thanks&Regards Kanagarajan.J
  5. Hi, i am facing some problem with excel format in jasper reports . When i export as Pdf and Html with image which is looking fine, But unfortunately in excel format image is looking as empty space. I am using this code File jrxmlpath = new File(request.getSession().getServletContext().getRealPath("/reports/"+fileName+".jrxml")); JasperReport jasperReport = JasperCompileManager.compileReport(jrxmlpath.toString()); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, new HashMap(),obj); OutputStream ouputStream=response.getOutputStream(); BufferedOutputStream buf=new BufferedOutputStream(ouputStream); response.addHeader("Content-Disposition","attachment; filename="+fileName+".xls"); response.setContentType("application/vnd.ms-excel"); JExcelApiExporter exporter=new JExcelApiExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, buf); exporter.setParameter(JExcelApiExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); exporter.setParameter(JExcelApiExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE); exporter.setParameter(JExcelApiExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); exporter.exportReport(); pls Help me.... Thanks in Advance with regards Kanagarajan
  6. Hi, i am facing some problem with excel format in jasper reports . When i export as Pdf and Html with image which is looking fine, But unfortunately in excel format image is looking as empty space. I am using this code File jrxmlpath = new File(request.getSession().getServletContext().getRealPath("/reports/"+fileName+".jrxml")); JasperReport jasperReport = JasperCompileManager.compileReport(jrxmlpath.toString()); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, new HashMap(),obj); OutputStream ouputStream=response.getOutputStream(); BufferedOutputStream buf=new BufferedOutputStream(ouputStream); response.addHeader("Content-Disposition","attachment; filename="+fileName+".xls"); response.setContentType("application/vnd.ms-excel"); JExcelApiExporter exporter=new JExcelApiExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, buf); exporter.setParameter(JExcelApiExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); exporter.setParameter(JExcelApiExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE); exporter.setParameter(JExcelApiExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); exporter.exportReport(); Pls help me.... Thanks in Advance with regards Kanagarajaa Post edited by: kanagarajaa, at: 2008/04/18 09:55
×
×
  • Create New...