Solved

Crystal Reports slow when creating ReportDocument and loading report

Posted on 2011-03-08
9
2,654 Views
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.

Thanks
Gav
0
Comment
Question by:gavsmith
  • 5
  • 4
9 Comments
 
LVL 100

Assisted Solution

by:mlmcc
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?

mlmcc
0
 
LVL 10

Author Comment

by:gavsmith
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.

Gav
0
 
LVL 10

Author Comment

by:gavsmith
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.
0
 
LVL 100

Expert Comment

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

mlmcc
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 10

Author Comment

by:gavsmith
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.
0
 
LVL 100

Expert Comment

by:mlmcc
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?

mlmcc
0
 
LVL 10

Accepted Solution

by:
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: http://blogs.msdn.com/b/amolravande/archive/2008/07/20/startup-performance-disable-the-generatepublisherevidence-property.aspx

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
0
 
LVL 100

Expert Comment

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

mlmcc
0
 
LVL 10

Author Closing Comment

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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now