cancel
Showing results for 
Search instead for 
Did you mean: 

Error during printing "RPC server is unavailabe"

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

saurabh_pathak
Active Contributor
0 Kudos

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

Answers (2)

Answers (2)

ted_ueda
Employee
Employee
0 Kudos

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

Former Member
0 Kudos

I thought abouth this one last night and it turns out this user was unique in having their default printer set to a local printer plugged into their workstation....and the printer was not turned on. WIth the printer turned on or using a network printer it works fine.

former_member183750
Active Contributor
0 Kudos

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