Results 1 to 2 of 2
  1. #1
    Alan is offline Member
    Join Date
    May 2007
    Posts
    39
    Rep Power
    0

    Default Slow reports in Netbeans

    I create reports with ireport, and when I do a query in it, the report appears immediately, when I executed in java (netbeans), after 3 minutes (yes, 3!) appeared the report. why is it so slow?

    Java Code:
    public class cExport_thread extends Thread{
    private Alumnos alu;
    private AccesoDatos con;
    /** Creates a new instance of cExport_thread */
    public cExport_thread() {
    }
    public void run(){
    con = new AccesoDatos
    ("developers","lania","com.mysql.jdbc.Driver","192.168.1.8","siau");
    con.iniciar();
    Connection conn=con.getConnection();
    
    try{
    File fdesign = new File
    ("C:\\SIAU\\Reportes\\reporte1.jasper"); 
    String fileName="C:\\SIAU\\reportes\\reporte1.jasper";
    // Ruta de archivo pdf de destino
    String destFileNamePdf="C:\\SIAU\\Reportes\\reporte1.pdf";
    //Ruta de archivo xls de destino
    // String destFileNameXls="C:\\SIAU\\reportes\\reporte1.xls";
    
    
    Map parameters = new HashMap();
    parameters.put("P_alu_carrera", "01");
    
    
    
    JasperPrint listo = JasperFillManager.fillReport
    (fdesign.getPath(),parameters,conn);
    
    
    JasperExportManager.exportReportToPdfFile(listo, 
    destFileNamePdf);
    
    JasperViewer.viewReport(listo);
    
    // JRXlsExporter exporter = new JRXlsExporter();
    //exporter.setParameter(JRExporterParameter.JASPER_PRINT, 
    jasperPrint);
    //exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, 
    destFileNameXls);
    //exporter.setParameter
    (JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);
    //exporter.exportReport();
    
    //System.exit(0);
    }
    catch (Exception e)
    {
    System.out.println(e.getMessage());
    }
    }
    If you have the solution, please help me
    Last edited by Alan; 06-01-2007 at 02:40 PM.

  2. #2
    Nick15 is offline Member
    Join Date
    May 2007
    Posts
    38
    Rep Power
    0

    Default

    It's a little bit slow, but 3 minutes ??
    do you have enough memory?
    Last edited by Nick15; 06-01-2007 at 02:02 AM.

Similar Threads

  1. Use unicode in iReport to produce reports
    By nasir_7b in forum Advanced Java
    Replies: 0
    Last Post: 03-17-2008, 12:53 PM
  2. slow JasperReport
    By bbq in forum Advanced Java
    Replies: 3
    Last Post: 02-11-2008, 09:34 AM
  3. Replies: 1
    Last Post: 07-31-2007, 05:53 PM
  4. Problems with reports in iReport
    By Albert in forum Advanced Java
    Replies: 1
    Last Post: 07-06-2007, 06:47 PM
  5. Reports in JasperReports
    By Jack in forum Advanced Java
    Replies: 2
    Last Post: 07-04-2007, 04:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •