Viewer JasperReport lambat..

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Viewer JasperReport lambat..

fanjavaid
Salam,
Saya baru menggunakan JasperReport, kenapa ya ketika menampilkan
Viewernya lambat?
Saya coba test waktu eksekusinya sbb :

generate jasper print : 6084
showing jasper viewer : 347

Ini kode generate report saya,
.....
             File file = new File("C:/reportGastroview1.jasper");

             long startExecution = 0;
             long endExecution = 0;

             //report = (JasperReport) JRLoader.loadObject(file);

             startExecution = System.currentTimeMillis();
             JasperPrint jp =
JasperFillManager.fillReport("D:/patient.jasper", new
HashMap(),DatabaseUtility.getConnection());
             endExecution = System.currentTimeMillis();
             System.out.println("generate jasper print : "  +
(endExecution -
             startExecution));

             // Execution Viewer
             startExecution = System.currentTimeMillis();
             JasperViewer.viewReport(jp, false);
             endExecution = System.currentTimeMillis();
             System.out.println("showing jasper viewer : "  +
(endExecution -
             startExecution));

             JasperViewer.viewReport(jp, false);
.....
mohon bantuannya,  terima kasih

Reply | Threaded
Open this post in threaded view
|

Re: Viewer JasperReport lambat..

Endy Muhardin
Coba SQLnya langsung dieksekusi ke database, makan waktu berapa lama?

- Endy Muhardin -
http://software.endy.muhardin.com/about
On Feb 12, 2013 12:20 PM, "fanjavaid" <[hidden email]> wrote:

> **
>
>
> Salam,
> Saya baru menggunakan JasperReport, kenapa ya ketika menampilkan Viewernya
> lambat?
> Saya coba test waktu eksekusinya sbb :
>
> generate jasper print : 6084
> showing jasper viewer : 347
>
> Ini kode generate report saya,
> .....
>             File file = new File("C:/reportGastroview1.jasper");
>
>             long startExecution = 0;
>             long endExecution = 0;
>
>             //report = (JasperReport) JRLoader.loadObject(file);
>
>             startExecution = System.currentTimeMillis();
>             JasperPrint jp =
> JasperFillManager.fillReport("D:/patient.jasper", new
> HashMap(),DatabaseUtility.getConnection());
>             endExecution = System.currentTimeMillis();
>             System.out.println("generate jasper print : "  + (endExecution
> -
>             startExecution));
>
>             // Execution Viewer
>             startExecution = System.currentTimeMillis();
>             JasperViewer.viewReport(jp, false);
>             endExecution = System.currentTimeMillis();
>             System.out.println("showing jasper viewer : "  + (endExecution
> -
>             startExecution));
>
>             JasperViewer.viewReport(jp, false);
> .....
> mohon bantuannya,  terima kasih
>  
>