Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Crystal Report for VS SP6 crashes randomly on Windows Server 2008 R2

$
0
0

Dear community,

 

I'm in front of a very incomprehensible printing issue.

 

I have a .NET (4.0) application, hosted on a server, that generates reports and spooled them to a dedicated printer spooler server.

 

I'm using Crystal Report XI SP6 for the document's generation.

 

 

This application run perfectly on Windows Server 2003 without any crash.

 

 

Now, both processing and printer spooler servers have been migrated on Windows Server 2008 R2.

 

When I reach printers with the network name (\\myserver\myprinter\), I have got randomly crashes with comexception, win32exception or invalidprinterexception (with a failure rate close to 50% !)

 


We tried lots of ways to solve this issue :

 

- grant user rights -> KO

 

- upgrade Crystal Report to SP8 -> KO

 

- change printer driver -> KO (crashes occures with HP, LEXMARK, CANON.... printers)

 

- customize print processor of printer driver.... -> KO

 

 

 

The only workaround we found : to map each printer in local to the processing server.

(but this trail is not possible because of the very large number of servers and printers we have)

 


So... I don't understand why by this way we didn't have any crash ?

 

Is there a specific setup for PrinterSettings, before calling the method "PrintToPrinter" of Crsytal Report Framework, when we execute the application under WS 2008 R2 (64 bits kernel English)?

 

How can I be sure that the origin of these crashes doesn't come from Crystal Report ?

 

 


Any help will be very very appreciate !

 

Thanks in advance
Julien

 


Examples of exceptions

 

#1

 

System.ComponentModel.Win32Exception (0x80004005): The handle is invalid
   at System.Drawing.Printing.PrinterSettings.GetHdevmodeInternal(String printer)
   at System.Drawing.Printing.PrinterSettings.GetHdevmode(PageSettings pageSettings)
   at System.Drawing.Printing.PrintController.OnStartPrint(PrintDocument document, PrintEventArgs e)
   at System.Drawing.Printing.StandardPrintController.OnStartPrint(PrintDocument document, PrintEventArgs e)
   at System.Drawing.Printing.PrintController.Print(PrintDocument document)
   at System.Drawing.Printing.PrintDocument.Print()
   at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, Boolean reformatReportPageSettings)
   at Service.Printing.SIPrinting.PrintReportToPrinter(ReportClass report, PrinterSettings ptSettings, PageSettings pgSettings, Int32 nbCall)
   at Service.Printing.SIPrinting.PrintToPrinter(TransfertPrintData data, ReportClass report)

 


#2

 

System.Drawing.Printing.InvalidPrinterException: Settings to access printer '\\myprinterspoolerserver\myprinter' are not valid.
   at System.Drawing.Printing.PrinterSettings.GetHdevmodeInternal(String printer)
   at System.Drawing.Printing.PrinterSettings.GetHdevmode(PageSettings pageSettings)
   at System.Drawing.Printing.PrintController.OnStartPrint(PrintDocument document, PrintEventArgs e)
   at System.Drawing.Printing.StandardPrintController.OnStartPrint(PrintDocument document, PrintEventArgs e)
   at System.Drawing.Printing.PrintController.Print(PrintDocument document)
   at System.Drawing.Printing.PrintDocument.Print()
   at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, Boolean reformatReportPageSettings)
   at Service.Printing.SIPrinting.PrintReportToPrinter(ReportClass report, PrinterSettings ptSettings, PageSettings pgSettings, Int32 nbCall)
   at Service.Printing.SIPrinting.PrintReportToPrinter(ReportClass report, PrinterSettings ptSettings, PageSettings pgSettings, Int32 nbCall)
   at Service.Printing.SIPrinting.PrintToPrinter(TransfertPrintData data, ReportClass report)
   at Service.Printing.SIPrinting.PrintCrystalReportWithHeader(TransfertPrintData data)
   --- End of inner exception stack trace ---

 

Message was edited by: Don Williams


Viewing all articles
Browse latest Browse all 3636

Trending Articles



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