Re: Preload Crystal Assemblies
- From: "Charlie Brown" <cbrown@xxxxxxxxxx>
- Date: 8 Jan 2007 08:03:52 -0800
Thanks for the code, I figured thats what had to be done.
JSantora wrote:
Charlie Brown wrote:
Is it possible to preload assemblies before they are called? Each time
the first report in my app runs, it takes 10-15 secs while it loads the
appropriate assemblies, after that any report that is run appears
immediatly.
Here you go...
' load up crystal when the app starts up.
' use a separate thread since its such a pig.
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")
' here's the code to load up a dummy report.
' this seems to load up and keep everything in memory throughout the
life of the app.
Public Sub LoadCrystal()
crReport = New ReportDocument
Try
' Need to preload crystal engine so the reports will print
quickly throughout the rest of the application.
' This report is not used, it is just loaded. Testing so
far 12/23/04 has not shown any
' problems such as memory or print errors.
crReport.Load(CrystalReportFolder & "rptBlank.rpt")
Catch ex As Exception
DisplayException(ex, "Error: Could find the startup Crystal
Report named 'rptBlank.rpt'." & _
vbCrLf & "If you are a new user, you may lack Server
permissions to read this directory and file: " & CrystalReportFolder &
"rptBlank.rpt" & _
vbCrLf & "Or the report may have been deleted or
corrupted. Please Call IT. [EJS0412311300]")
End Try
End Sub
.
- Prev by Date: urgent*pass parameter from form of visual basic ver 6 to crystal report for partucular data from combo
- Next by Date: How do you access Crystal embedded reports in ASP.NET/VB.NET 2003?
- Previous by thread: urgent*pass parameter from form of visual basic ver 6 to crystal report for partucular data from combo
- Next by thread: How do you access Crystal embedded reports in ASP.NET/VB.NET 2003?
- Index(es):
Relevant Pages
|
Loading