Symptom
- Processing of first report in a Visual Studio .NET is slower than when the report is loaded in the Crystal Reports Designer
- Subsequent reports are processed equivalently to the Report Designer
Cause
See the article "Improving Crystal Reports Performance in Visual Studio .NET Applications" for discussesion of causes and possible solutions.
Resolution
A resolution not documented in the article referenced under the "Cause" tab is documented below
'Use a separate thread to load a report which will load and initialize the Crystal Reports runtime
TraceWriteLine("starting Crystal Reports Thread")
myTimer = New FunctionTimer("load crystal")
Dim t As New Thread(AddressOf LoadCrystal)
t.Priority = ThreadPriority.BelowNormal
t.Start()
myTimer.EndTimer()
TraceWriteLine("...thread started")
'Load up a dummy report - no database connection requiredPublic Sub LoadCrystal()crReport = New ReportDocument
Try' This report is not used, it is just loaded.crReport.Load("path to a report")
Catch ex As Exception
DisplayException(ex, "Error String"
End TryEnd Sub
Keywords
slow, performance, load, fast, faster, runtime, first , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To
Product
SAP Crystal Reports XI R2