Wednesday, March 08, 2006 10:41 PM
I'm having a crystal reports performance issue within my VB 2005 Windows application I'm hoping someone can assist with. When I open a report after initial application startup, my hard drive spins like crazy and it takes approximately 20-25 seconds to display the report. Subsequent reports are very snappy and display almost immediately.
I'm guessing the initial delay is related to components in the crystal reports engine being initialized. If this is the case, is there a way to initialize during application startup? Anybody else experience the same issue? By the way, the application was developed using VS2005 Professional Edition (in Visual Basic) and uses SQL Server 2005 Express Edition for the backend database.
Thanks in advance for the help,
Monday, March 27, 2006 3:28 PMSo far no responses, so I thought I'd move the thread back to the top. ANY help would be greatly appreciated!!
Monday, March 27, 2006 4:17 PMAre you using the crystal reports came with VS2005?
I also have performance issue, it is extremely slow compared with crystal reports XI, especially in looping the object and setting logon info. Try to use XI with .net if you have its license.
Tuesday, March 28, 2006 9:28 PM
Thanks for the reply Barry. I am using the version of Crystal Reports that is integrated into VS2005 Pro edition. Are you happy with CR XI R2? Are you having any issues using R2 with VS2005? I know R2 is supposed to support VS 2005, but I'd like to hear it from the people that actually use it...
Sunday, April 09, 2006 9:04 AM
I am using CR XI Release 2 and having the same issues as you are. Up to a minute for initial load (not just after application start but after an hour /day or so - client having the problem). Once it has loaded, reloads are very quick, even with loads of data.
Apart from the initial report load delay I'm very happy with XI developer, developing a report with Crystal's developer application is much better than in the IDE - it makes lining up controls much easier for one thing.
If anyone finds something to fix this I'd be very interested
Wednesday, June 14, 2006 7:21 PMAny luck with this? I am currently trying to resolve the very same issue.
Wednesday, June 14, 2006 7:34 PM
No, I haven't had any luck yet. I was hoping for a reply from someone from Crystal telling us what the problem is and maybe how to fix it. It seems like many are having the same issue. Now that the thread is back on top, maybe we'll get a response.
Wednesday, June 14, 2006 9:18 PM
Well well well....I entered a support case with Business Objects, they are quite good about getting back to you on those. Unfortunately the response was less than satisfying....looks like a kludgy workaround is our only solution.....here is what they said....
This is an expected behavior. On initial start up, a number of Crystal assemblies and objects need to be created and this does take some time. As a BTW., once you run the 1st report, you could close the app and restart it and the performance should be much quicker. Only actual computer re-boot will once again result in initial slow load. I do not have any was of "pre-loading" the assemblies and objects, however I id suggest the following to one of my customers:
On start of the application, load a report and programatically export it to some temp directory (any format will do) - no viewer needed, just a simple export that nobody will see. As this happens on load of the app exe, the load time is now at start of the app as opposed to first run of a report. Once the user actually needs to run the report, all the assemblies, etc. are loaded and there will be no delay. The export code is described in this White Paper on page 192+
Wednesday, June 14, 2006 9:26 PM
Thanks a lot for running that down! Looks like I'll have to work on that workaround. Down you happen to have a link to the White Paper they're talking about??
Friday, October 06, 2006 4:43 PM
Expanding on April's comment, here's something I've tried that seems to work very well. I have a data entry form with a print preview button. When the user clicks the button it opens up another form that holds the Crystal Report viewer. The trick is to use a BackgroundWorker component and let it do the loading for you. Here some sample code:
Private viewer As New MyViewer
' This variable will be used in the print button
' Click event and in the background worker RunWorkerCompleted
' event. It will let the background worker know if the
' print button was clicked while it was loading Crystal.
Private printRequested As Boolean = False
PrivateSub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.BackgroundWorker1.WorkerSupportsCancellation = True
' Start worker.Me.BackgroundWorker1.RunWorkerAsync(printRequested) End Sub
PrivateSub PrintPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintPreview.Click If Not BackgroundWorker1.IsBusy Then
printRequested =True End If End Sub
PrivateSub MainForm_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing ' Cancel worker before closing If BackgroundWorker1.IsBusy Then BackgroundWorker1.CancelAsync() End Sub
PrivateSub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork Dim worker As BackgroundWorker = CType(sender, BackgroundWorker)
e.Result = LoadCrystalReports(CBool(e.Argument), worker, e) End Sub Private Function LoadCrystalReports(ByVal showViewer As Boolean, ByVal worker As BackgroundWorker, ByVal e As DoWorkEventArgs) As Boolean If worker.CancellationPending Then
e.Cancel =True Else Dim report As New MyReport
viewer.CrystalReportViewer1.ReportSource = report
viewer.CrystalReportViewer1.Zoom(1) 'Page widthEnd If Return showViewer End Function
PrivateSub BackgroundWorker1_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted If Not (e.Error Is Nothing) Then
MessageBox.Show(e.Error.Message)ElseIf e.Cancelled Then ' Next, handle the case where the user canceled the ' operation. ' Note that due to a race condition in ' the DoWork event handler, the Cancelled ' flag may not have been set, even though ' CancelAsync was called. ElseIf e.Result = True OrElse printRequested = True Then ' Finally, handle the case where the operation succeeded. ' If the print button was clicked then display viewer.
viewer.ShowDialog()End If End Sub
Friday, October 06, 2006 5:40 PM
Thanks for the follow up. Our App is being QA'd right now, and although we have implemented the work-around I'm still not crazy about the idea, and the pre-loaded components still take 3-5 seconds to load, which is significantly slower than the rest of the app. I will try your suggestion on the next revision, as it is out of my hands right now, and post back my results.
Friday, January 11, 2008 10:43 AM
I think the best work around is to load a sample report at application startup in a seperate thread (so that the application startup time remains the roughly the same)....Just load, no viewing or exporting.....
All calls in in the applcation for the report will be much faster...
Friday, January 11, 2008 10:47 AM
The best solution that i tested and implemented was to load a report at application startup....Just load..no need to preview or export.....
Its a good pratice to use a separate thread for this initial load so as not to increase the application start up time..
All report calls to in the application including the first one are realtively quicker after this...:-)
Tuesday, February 03, 2009 4:25 PMHi all,
I have a composite wpf application.
In one of the modules, there is a crystalReportViewer.
I load a report during the application's initialize event. Here I create a ReportDocument and perform a Load on it.
This doesn't affect the initial creation of the CrystalReportViewer !
What am I doing wrong? How can I make it run faster?
Tuesday, March 17, 2009 10:03 PMI guess I am raising the same question that this thread started with.
Crystal report viewer is very slow while showing the report with VS 2005 and Crystal XI. ( The same report is working very fast in VB5 , Crystal 7)
Here is my code
Dim dtMonthlyReport as new ReportDatasSet.SummaryReportDataset 'method to execute the query and return the result set in datatable ExecQueryAndReturnResultSetInDataTable(strQuery,TempDataTable) Dim strReportPath as string= "ReportFilePath" Dim objReportDoc as new CrystalDecisions.CrystalReports.Engine.ReportDocument objReportDoc.Load(strReportPath) 'set the datasource to report doc objReportDoc.Database.Tables(0).SetDataSource(dtMonthlyReport) 'set the reportdocuemnt to report viewer Dim rptViewer as new MyReportViewer rptViewer.CrystalReportViewer1.ReportSource = objReportDoc rptViewer.Show()
The report I am trying to view in the reportviewer is of type "Cross Tab". The same cross tab report used to take 2 to 3 seconds in VB5 and Crystal 7. The same report is taking 5 to 6 minutes in VS 2005 and Crystal report XI R2 and when I try to move the report system is hanging and CPU Usage is showing 100%. Print function is also not printing the entire report.
I googled most of the crystal forums and I have tried the following
-- removed page navigation on the crystal file
-- report Options check Group on server
-- cleared the temp folder
I have this problem with only Cross Tab reports. PC I am using is XP, 3.2 Ghz , 2 GB RAM.
Please let me know -- Did I do anything wrong? Is there any other way to improve the performance.
I am struck with this problem I am eagerly waiting to know the solution.
- Proposed As Answer by Krishna Rao bashaboiina Tuesday, March 17, 2009 10:27 PM
Friday, April 10, 2009 12:28 PMThis was what was causing my slow loading time (I already implemented the preloading; but the preloading was extremely slow)
(CR Forum thread: https://www.sdn.sap.com/irj/scn/thread?threadID=1264363&tstart=0)
I found out that the slow loading time was caused by dll's who connect to crl.verisign.net.
Our firewall blocked those requests without response so this caused an additional +-1 min. loading time.
There are also some connections to thawte.com. I'm not sure if they are related to CR. Maybe Janus is the cause of this (also a 3rd party tool I use).
Simular issue: http://bonkel.wordpress.com/2008/11/18/crystal-reports-slow-load-using-net-c-setdatasource/
I found some solutions on the internet (As for our solution: I'm still discussing this internally which will be the best option. Option 2 works ((tested)) but we are evaluating the security issues ...):
There are four possible workarounds to avoid the delays of not being able to reach the certificate provider's server
1. Provide access to the VeriSign web server, by providing an open Internet connection and opening up the system's firewall to allow the VeriSign server query to succeed.
2. Disable Certificate Revocation Checking for the entire system. This can be accomplished by unchecking the "Check for publisher’s certificate revocation" option on the Advanced tab of Internet Options. Internet Options can be accessed the Control Panel or from the Tools menu item of the Internet Explorer browser.
3. Manually download the Certificate Revocation List from VeriSign at crl.verisign.com and install it on the system. The CRL is valid only for 10-15 days, so unless the system is able to update the file after this time, the same issue will be encountered in the future.
4. Use versions of the assemblies that are not digitally signed. This is the solution suggested most highly by Infragistics Developer Support. The release build of NetAdvantage for .NET 2007 Volume 1 for CLR 2.0 (version 7.1.20071.40) did not have a non-digitally signed version of the assemblies. Starting with the first hotfix build (version 7.1.20071.1045), the assemblies installed are not digitally-signed, and versions of the assemblies that are digitally-signed are stored in the "ASP.NET\Bin - Signed", "ASP.NET\APTCA - Signed" (for allowing partially-trusted callers), and "Windows Forms\Bin - Signed" subfolders of the installation director
And here is my actual solution:
We already use .net Framework 2.0 SP2 so the hotfix for this particular problem with the FrameWork 2.0 was implemented in the framework.
So the only thing I had to do was to add the following to the App.config file:
(I added it to the bottom of the config file because adding it to the top caused an error)
(I tested this and it works great ;) )
I hope this helps some ppl out ;)
- Proposed As Answer by hypo Friday, April 10, 2009 12:28 PM
Monday, February 15, 2010 3:57 AMThanks Hypo!
I finally tracked our slow Crystal issue down to the same cause (dlls connecting to crl.verisign.net) but was not sure how to resolve it.
This was very helpful.
Wednesday, June 30, 2010 7:16 AM
Now i am facing same problem. Even if i load dummy report while loading application. When i trying to open actual reports still it is taking time for the first time.
Anybody solved this issue?
Please tell us the solution.
Thanks in Advance
Monday, July 05, 2010 11:25 AM
I have tried the pre reload of report but it didnt work for me, after that I have tried point 2
Disable Certificate Revocation Checking for the entire system. This can be accomplished by unchecking the "Check for publisher’s certificate revocation" option on the Advanced tab of Internet Options. Internet Options can be accessed the Control Panel or from the Tools menu item of the Internet Explorer browser.
Point Works well with me I do not have to change any thing else.
Thanks and Regards,
Sunday, February 20, 2011 6:32 PM
Did you figure out the solution? i have the same issue ....
But when i run my report with Excel input, it is okay ... but when i create my report using stored procedure input (directly from database),
it is very slow to nagivate the viewer toolbar....
take 20 mins to initially run the report viewer, then everytime i click on the Next button or Prev button on the viewer, it takes 20 mins ... then click on the export button to popup the window takes 20 mins, then export to pdf, takes 20 mins, what's wrong with it?
Tuesday, June 14, 2011 5:29 PM
The solution we found here was to remove the BusinessObject DLL's from our REAL TIME virus scanner. The first time these DLL's are loaded, the real tim sacanner checks them all before allowing them to load. By setting these files to full trust, removing them from the pre-scan, the report viewer loads in half the time