Hello,
I have a piece of code that prints an empty page.
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!!!
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
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!!!