Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 703
User2012384 Avatar asked Oct 22 '13 04:10

User2012384


2 Answers

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.

like image 132
Phil Kermeen Avatar answered Nov 11 '22 12:11

Phil Kermeen


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.

like image 1
M_Idrees Avatar answered Nov 11 '22 13:11

M_Idrees