Quantcast
Viewing all articles
Browse latest Browse all 3636

Crystal Reports Hangs on .Load event

Hi ,

 

We are using CR 2011 on Windows environment (2008 R2) and  run the following workflow.

 

1. We have created a rpt with 9 sub reports.

2. We would like to print the port to a particular printer and hence have set the flag <NO Printer> on the report

3. The application is a windows based application and not a web based application.

4. We have tested the report by launching the report and printing it on the desired printer.

5. We have a windows service that executes the code of reading the report and printing it out as a pdf / printer.

6. Step 4 is an event based activity that occurs as frequently as every 2 minutes.

7. The database is Oracle 11g

 

PROBLEM:

 

1. Generally all runs well, however once / twice a day the report hangs.

2. We have created a dump file and observed that the hang occurs on .LOAD event.

3. We are using the .LOAD with a single parameter that of the report name.

4. We also observed that the spooler service hangs

5. We are disposing the report immediately after printing it.

 

After the problem occurs we are forced to start the windows service and the printer spooler service.

 

Solutions tried so far:

 

1. Changing the No Printer flag did not give any results.

2. We have created a job that restarts the windows service and the spooler service after a period of 30 mins. - This has minimized the occurances but not eliminated the problem.

 

Pseudo code:

 

ReportDocument CR = new ReportDocument()

 

CR.Load(<report file name);

 

//Set Main data Source

CR.Database.Tables[0].SetDataSource(ADODB.Recordset)

 

//set sub reports

CR.Subreports[<Index>].Database.Tables[0].SetDataSource(data table)

 

//here it prints on default printer or the set printer. (Printer s are UNC printers, however we register them - they are visible as local printers on the given machine -  locally before printing)

 

CR.PrintToPrinter(noOfCopies, false, fromPage, toPage);

 

CR.Close()

CR.Dispose()

 

IF required we can also provide the rpt file and any other details.

 

Our customers are really suffering cause of this and any help would be really appreciated.

 

Thanks

 

Anil


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>