User2012384
User2012384

Reputation: 4927

Crystal report document load hangs

Whenever the program reaches the below code, the program hangs

protected void InitCrystalReport(String _reportUrl)
{
    myReportDocument.Load(_reportUrl);
}

This situation only happens when I put the web on IIS (another server), but it doesn't exist when I run the application on Visual studio (Debug mode). I've also used process monitor to monitor the process to see if the file is access denied.

I've tried below on Web Server but none of them works:

  1. Changing application pool to .NET Classic
  2. Restart the printer spooler

Edit
I restarted the server and everything's OK now

Upvotes: 7

Views: 2935

Answers (2)

M_Idrees
M_Idrees

Reputation: 2182

Although this is old question already answered, I also encountered same problem and after wasting one whole day, I got suggestion from @PhilKemreen answer. Here is how I fixed it in my case:

  1. Open report in Crystal Report Designer and Right Click
  2. Select Design > Page Setup..., Page Setup Dialog box appears.
  3. From the printer drop-down list, select Microsoft XPS Document Writer.
  4. Click OK.

Then I deployed the new report file on server, it works.

Upvotes: 1

Phil Kermeen
Phil Kermeen

Reputation: 139

I had this problem when i moved a new report to the test server. My fix was to set a specific printer through File.. Print.. to one i knew was on the server (in this case MS XPS Document Writer). Ensure you've used .dispose etc on the object when you're done.

Upvotes: 3

Related Questions