on 04-07-2016 8:59 AM
I'm using Crystal Reports developer version 13.0.16.1954 (service pack 16, latest version at this moment) for Visual Studio 2015.
ReportDocument.Load takes more than one minute when the database server the report is linked to is not available.
This is all code required to reproduce the issue:
Dim rd As New ReportDocument
rd.Load("c:\temp\test.rpt")
Obviously Crystal Reports tries to locate the database server. Is there any way to prevent CR from doing this?
Try this:
1. Edit the report.
2. Go to the File menu and make sure that "Save Data with Report" is not turned on.
2. Go to the File menu and select "Report Options".
3. Make sure that "Verify on First Refresh" is NOT checked.
Save the report and try running it through code again.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply, but it didn't help, I'll try to explain why.
I'm using CR for Visual Studio 2015, so there is no File menu. And I can't find the option "Save Data with Report" anywhere in the Visual Studio 2015 "Crystal Reports"-menu. I did find the option "Verify on First Refresh" in the report options, and it was not checked. Then I opened the report in Crystal Reports 8.5 (it was created in CR 8.5), to find that "Save Data with Report" was not turned on.
So actually both settings are turned off as required but the problem still persists.
EDIT:
Crystal Reports - Report - Report Options - Verify on first refresh: OFF
Crystal Reports - Design - Default Settings - tab Database - Verify on first refresh: OFF
I translated these options from Dutch to English, unfortunately I can't set Crystal Reports to English.
Ahhhh! CR 8.5 is a VERY old version of Crystal - it's been out of support for around 15 years. The internal structure of .rpt files had some major changes with Crystal 9. It could be that the report is taking a while to load because of those differences. You might try saving the .rpt file from VS in order to upgrade it.
I also just had another thought - if you let the report load once, close it and then open it again or open another report, is the issue still there? If not, then the slowness you're seeing is due to the .Crystal NET assemblies loading the first time a report is loaded.
-Dell
You are right Dell, thanks for your help!
I took the following steps to convert the Crystal Reports 8.5 report (connected to customers database server) to Crystal Reports 13:
The report is still connected to the customers database server (which cannot be found in our network obviously), but now loads immediately (ReportDocument.Load), even if I rename or delete the SQL Server alias.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.