cancel
Showing results for 
Search instead for 
Did you mean: 

ReportDocument.Load slow when database server not available

george_
Explorer
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

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

george_
Explorer
0 Kudos

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.

DellSC
Active Contributor
0 Kudos

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

george_
Explorer
0 Kudos

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:

  1. Create SQL Server alias to customers database server.
  2. Open report in Visual Studio.
  3. Save report, it will be converted to Crystal Reports 13.
  4. Verify database.
  5. Save report again.

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.

Answers (0)