Crystal Reports slow when creating ReportDocument and loading report

Posted on 2011-03-08
Last Modified: 2012-05-11
Hi Experts,

I have created serveral crystal reports (in version 2008) and a single C# console application in VS2008 which basically creates the ReportDocument object, loads the report and either exports or prints it.

CrystalDecisions.CrystalReports.Engine.ReportDocument rptDoc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
rptDoc.Load(sParamDOC); //sParamDOC being the report name to process passed in via command line argument

Open in new window

On a server (windows server 2003) that is only accessed via remote desktop connection I have installed crystal reports redist 3.3 and copied the program and reports over. Everything was working great.

I discovered that when the users ran my program it was taking a long time to execute. I put in some code to debug where the performance hit was and realised that when I logged in and ran the program it runs everything in a reasonable time (less than 20 secs), creating the ReportDocument and loading the report takes seconds and the rest of the time is processing the report.

When anybody else logs in it takes about 1 minute to create the ReportDocument and another minute to load the document then continues to take longer to process the report. Times do vary a little but I've seen it take up to 4+ minutes.

I first assumed it had something to do with security as I'm an administrator so I created a fake user giving it admin priviledges and it still runs slow logged in with this user. It only seems to be quick for me.

I also tried changing the security mode of terminal services to 'relaxed security' as it is being called from an old legacy app. This has no effect either.

I've tried posting on the SAP Crystal Report forum but haven't had a reply from them.

I hope somebody can give me some pointers as where to look next because I feel a little stuck at the moment.

Question by:gavsmith
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
LVL 100

Assisted Solution

mlmcc earned 250 total points
ID: 35071838
Did you log in from the same machine?

Are you logging in the same way a regular user does?

LVL 10

Author Comment

ID: 35080883
Hi mlmcc

While I was running the tests with the new user I setup with admin priviledges, I was using the same laptop to login via remote desktop. And I was logging in the same way yet still seing the large performance difference.

While I was doing my tests with my login details and new user I was logging in to see the desktop, however regular user's have their .rdp set to run the program straight away (so they don't see the desktop).

Just thought of one thing!!... a difference between me and the others is that at some point I would have logged in at the console and the others wouldn't. I'll test that to see if it makes a difference and let you know.

Anything else you could suggest would be great though.

LVL 10

Author Comment

ID: 35082055
I tried the same test running on the console instead of remote desktop and get the same results:

Logged in as me:

 Logged in as me
Logged in as a newly setup administrator:

 Logged in as other admin
As you can see logged in as me it takes 3 seconds to create the object, load the report and setup the export options. Logged in as somebody else this process takes 1min 2secs which is a big difference.
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

LVL 100

Expert Comment

ID: 35085303
I wonder if there is some kind of caching going on.

LVL 10

Author Comment

ID: 35087852
Interesting idea, it's out of hours so I have restarted the server and tried again (in theory nothing should be cached because of the restart) logging in using my credentials it did take longer on first run (7secs to create object, a further 12secs to load report - 19secs total) however second run was back to being fast again (4secs for both).

Logged in as other user, first run it took 41 secs to create object and 36 secs to load. second run it took 35 secs to create object and 36 secs to load report.

If it was a caching problem I would expect all users to be creating the object and loading the report in around 19secs like my first run. I have a feeling the problem is something deeper within windows server 2003 but I don't know what.
LVL 100

Expert Comment

ID: 35089537
I am at a loss but thought that might be an issue.

Any chance there is a upped priority for your administrator jobs?

Have you logged in as a normal user on your machine?

LVL 10

Accepted Solution

gavsmith earned 0 total points
ID: 35099743
I figured it out! It turns out the reason it's slower for all the other users is... 'they can't access the internet'! Not that my application access's the internet (not directly anyway).

I used Sysinternal's Process Explorer to dig into which dll's were loading slowly and noticed Crypt32.dll taking some time. After doing some more searching I came across this blog:

The dll's are digitally signed and it's automatically trying to trying to verify itself via the internet. So I included an app.config file including the '<generatePublisherEvidence enabled="false"/>' tag mentioned in the blog and it fixed the problem.

Thank you for your suggestions
LVL 100

Expert Comment

ID: 35099986
There is no need to award points for effort.

LVL 10

Author Closing Comment

ID: 35135894
I've awarded some points for trying to help. thanks again

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Set custom font WPF 2 21
Help with a Crystal Formula 6 23
c# ftp code 3 28
Web page design problem 3 16
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question