Recently, I'm testing to print reports created using Crystal Reports XI. I've included the new crystal decisions library into my project but whenever I try to load the report, I keep getting "Load report failed" error.
ReportDocument objDoc=new ReportDocument();
// Load the report
objDoc.Load(strReportFilename); <-- Error happens here!
...
...
...
// Print the report
objDoc.PrintToPrinter(int.Parse(copies), true, 0, 0);
Kheen On Cheah7 pointsPosted Nov 15, 2006, 5:29 PM EST
Kheen On Cheah7 pointsPosted Nov 16, 2006, 12:21 AM EST
If I deploy to the server, I don't get any error but looks like it just hangs at PrintToPrinter.
Annamalai samy3 pointsPosted Dec 11, 2008, 7:01 PM EST
please check whether the strReportFilename contains full report file path
if you are taking more than on report using some loops add the code below to remove from the garbage collection
objDoc.Close();
objDoc.Dispose();
objDoc = null;
GC.Collect();
GC.WaitForPendingFinalizers();
Faisal2 pointsPosted Dec 15, 2008, 7:37 PM EST