Quantcast
Channel: VBForums - Reporting
Viewing all articles
Browse latest Browse all 594

Crystal Report very slow on first load

$
0
0
Hello,

I have a piece of code that prints an empty page.
Code:

Private Sub pnKassa_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles pnKassa.Click
    Me.Cursor = Cursors.WaitCursor
    Dim cryRpt As New ReportDocument
    Dim ReportPath As String = Application.StartupPath
    cryRpt.Load(ReportPath & _LocatieOverzichten & "crLEGEPAGINA.rpt")
    'Druk het overzicht af naar de standaard printer
    cryRpt.PrintToPrinter(1, False, 0, 0) 'Stuur het overzicht naar de default printer
    '********************
    Me.Cursor = Cursors.Default
  End Sub

The first time I run the code the report takes like 15 seconds to print.
When I run the code the second time it only takes about 3 seconds.

What am I doing wrong?
Should I load the report one time when the application starts so that all of my reports load faster?

Thanks in advance!!!

Viewing all articles
Browse latest Browse all 594

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>