AWestEng
asked on
Speed up crystal report load
Hi!
I'm having problem with the speed regarding loading of a crystal report to the report viewer.
Can I speed this up,?
Is it possible the "load" crystal report when starting the application so the first report will be faster to load
I'm using the crystal report that are implemented in VS 2005
I'm having problem with the speed regarding loading of a crystal report to the report viewer.
Can I speed this up,?
Is it possible the "load" crystal report when starting the application so the first report will be faster to load
I'm using the crystal report that are implemented in VS 2005
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you read the comments, you discover that they load a blank/dummy report just to have the DLLs in memory. It can also be done in a different thread.
ASKER
It didn't help much to do that, it still takes alot of time to do the first report..
have i missed something.
I do this
Public Sub New()
Dim t As New Thread(AddressOf LoadCrystal)
t.Priority = ThreadPriority.BelowNormal
t.Start()
End sub
Private Sub LoadCrystal()
Dim crReport As New rptBlank
Try
crReport.Load()
Catch ex As Exception
Throw ex
End Try
End Sub
have i missed something.
I do this
Public Sub New()
Dim t As New Thread(AddressOf LoadCrystal)
t.Priority = ThreadPriority.BelowNormal
t.Start()
End sub
Private Sub LoadCrystal()
Dim crReport As New rptBlank
Try
crReport.Load()
Catch ex As Exception
Throw ex
End Try
End Sub
are you loading this dummy report when the application is starting?
you may also load the form that has the CR viewer on it because it is loading other DLLs.
you may also load the form that has the CR viewer on it because it is loading other DLLs.
ASKER
oki.. but that form is in tool that i dock to the main form, so how do I solve that?
can't you just load the form without setting it to visible?
ASKER
No i have stuff in the constuctor that sends stuff to the main form.
is there any other solution?
is there any other solution?
you can create a different constructor specifically for that task or create a different dummy form to load CR viewer DLLs.
ASKER
I can test that.
I alos tested this but htat didn't solve the problem either
Private Sub LoadCrystal()
Dim crReport As New rptBlank
Dim crReportViewer As New CrystalDecisions.Windows.F orms.Cryst alReportVi ewer
Try
crReport.Load()
crReportViewer.ReportSourc e = crReport
Catch ex As Exception
Throw ex
End Try
End Sub
I alos tested this but htat didn't solve the problem either
Private Sub LoadCrystal()
Dim crReport As New rptBlank
Dim crReportViewer As New CrystalDecisions.Windows.F
Try
crReport.Load()
crReportViewer.ReportSourc
Catch ex As Exception
Throw ex
End Try
End Sub
ASKER
Hmm i tested to open the form load a report, close the form opened the form again and load the report.
it was not faster the seconds time,
But if i load the a seconds report to the viwer (and not close it between the loads) then the report load very fast, so I wonder, can I get the process any faster then i already has?
it was not faster the seconds time,
But if i load the a seconds report to the viwer (and not close it between the loads) then the report load very fast, so I wonder, can I get the process any faster then i already has?
ASKER