on 10-08-2010 12:49 AM
We've deployed a .Net 3.5 WinForm application that uses Crystal Reports 12 sp2 . The app prints to printer via code like the following
PrintDocument pd = new PrintDocument();
crReportDocument.PrintOptions.PrinterName = pd.PrinterSettings.PrinterName;
PrinterSettings settings = new PrinterSettings();
settings.PrinterName = pd.PrinterSettings.PrinterName;
crReportDocument.PrintToPrinter(1, false, 0, 0);
On one deployed workstation, when the user tries to print they get the following exception, and the question is why?
NativeErrorCode : 1722
ErrorCode : -2147467259
Data : System.Collections.ListDictionaryInternal
TargetSite : Void OnStartPrint(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintEventArgs)
Stack Trace : 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(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)
The user has printers setup, a default printer, and can print from other application such as Word, Adobe, etc, without problem.
Hello,
What is the method used for deployment?
What is the machine environment where application fails? (like OS 32 or 64 bit)
Make sure that you have latest printer drivers.
Also you can go through [How Printer Driver Options Affect a Report|http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/a09051e9-721e-2b10-11b6-f9c65c64ef29]
Thanks,
Saurabh
Edited by: Saurabh.Pathak on Oct 8, 2010 2:07 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's a RPC error from within the .NET Framework - meaning the .NET Framework called Win32 to request printer services, and something bad happened.
So I'm assuming that the target printer it's trying to print to is a networked printer, and the request can't see it.
If you take CR out of the equation, and try to print something directly to the target printer via a simple .NET Framework app, does it work? That's the first thing I'd check.
Sincerely,
Ted Ueda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See if [this|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/17342] [original link is broken] [original link is broken] [original link is broken]; blog will help.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.