I am using vb.net ajax to load a crystal report located on the server - sometimes it works and other times the call to .export just hangs sql server and we have to restart the sql server. I can't find any discussions of this error anywhere and I'm sick of searching! Has ANYONE gotten this before?

Thanks!

Yes... I once had the same problem.The first time it works and after that it wont..isn't? This is because due to the improper connection closing procedure.

For me after that it worked well.

Check this... if the problem still exists try to debug with full attention on the codes...

I can't even debug it - once my vb.net code hits the crystalreport.export() it leaves to create the report (which the report is located on the server and connected to sql database and independently runs just fine) and the vb program never comes back. I have to then restart the sql services as nothing else can connect to anymore. Once I restart the services the debug comes back to the next line of code but no report.

And to clarify - it doesn't work the first time and then never again, it works only on some calls to it. We have 3 different senarios that call this routine. The first 2 senarios it works no problem but the 3rd crashes it every time. The report does not change, the parameters do no change. I can use the parameter from the 3rd senario and open the report on the server, pass the parameter and refresh the data works every time. When calling the .export from the code it hangs sql server.

I have had problems with this using SSRS (SQL Server Reporting Services) and it turns out that it is a process that terminates and must be restarted to pull a report.

The workaround that I had found is here.

The first pull starts the process/freezes , and the second pull is fine correct?

Edited 3 Years Ago by Begginnerdev

No, thats not quite right. We have 3 different senarios. Senario 3 is not common. When senario's 1 and 2 call the export it works just fine all day long. It works the 1st time, 2nd time 5th time no difference. BUT when senario 3 is called - once or twice every few days it crashes every single time. EVERY SINGLE TIME.

Let me try to explain better:

We have 3 senarios that call the same CrystalReportGenerator. 1 & 2 are called every day all day long never crashes the system, ever.

3 is called every few days, even when it is called after 1 & 2 have just run, multiple times sucesfully, as SOON as #3 runs it crashes.

The question would be then, is it a problem with #3?

Have you looked at your SQL statements to see if it is causing the service to time out?

Ie. alot of inner joins,table creations, or any cpu hog procedures?

Let me give you some more details:
Main code: If variable in(1,2,3) then call "generate report"

"Report.rpt" is a crystal report. The report itself is 2 stored procedures "Get main data" (1 record) and sub-report "Get details for main data" (1 to many records). There are a few joins in the sp however nothing complicated. Literally only 1 parameter (it's an id field).

If I open the actual report on the server and run it for 1,2 or 3 no issues.
There is nothing different in the call from either 1, 2 or 3.

Like I said if I run the report manually it never freezes and if I call the sp from sql server no issues.

One possible problem ( that I've had with CR ) could be that the report was built on a 64bit CR machine, and published. We had to make sure it was a 32bit machine to fix our problem.

It did the same, timed out on pull, but pulled fine in GUI.

This article has been dead for over six months. Start a new discussion instead.