Skip to Content

"The printer couldn't print" when printing via PrintOutputController

Hi, my app uses ReportDocument.ReportClientDocument.PrintOutputController.PrintReport() to print, and I've found that it fails to print to certain printers. The call to PrintReport() succeeds, but Windows pops up a notification saying "Error printing on [printer name]" "The printer couldn't print", and if I open the queue for the printer, the document is in status "Error - Printing".

However, the same code prints fine to other printers. And strangely, I can also print to that printer if I just change the network port type from a WSD Port to a TCP/IP port. (But I can print to other printers that are connected via a WSD Port). The Brother HL-L2370DW is a printer that I can't print to via WSD, but the HL-L8260CDW works fine via WSD.

The HL-L2370DW was originally set up using the "Brother Laser Type1 Class Driver" that's bundled with Windows 10, but I tried installing the specific "Brother HL-L2370DW series" driver for it, and it behaves the same way.

I'm running Windows 10 version 1909 (OS Build 18363.1016) and CR for VS 13.0 SP28.

I can supply a small sample project that demonstrates the problem, but it's basically just:

    var rep = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

    var pro = new CrystalDecisions.ReportAppServer.Controllers.PrintReportOptions();

The trick to reproducing the problem seems to be the printer, not the code itself. I haven't found any other apps that have problems printing to the problem printer. And actually, Crystal Reports can print to the problem printer just fine if I use ReportDocument.PrintToPrinter() rather than PrintOutputController.PrintReport(), but I use the latter because the former can be very slow (as mentioned in this Stack Overflow post).

Any thoughts about how I can troubleshoot this further?

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Aug 26 at 08:38 PM

    I'll have to ping R&D to see if it can.

    P2P uses these:

    System.Drawing.Printing.PrintDocument pDoc = new System.Drawing.Printing.PrintDocument();
    CrystalDecisions.Shared.PrintLayoutSettings PrintLayout = new CrystalDecisions.Shared.PrintLayoutSettings();
    System.Drawing.Printing.PrinterSettings printerSettings = new System.Drawing.Printing.PrinterSettings();

    RAS uses these:

    System.Drawing.Printing.PrintDocument pDoc = new System.Drawing.Printing.PrintDocument();
    CrystalDecisions.ReportAppServer.Controllers.PrintReportOptions rasPROpts = new CrystalDecisions.ReportAppServer.Controllers.PrintReportOptions();
    CrystalDecisions.Shared.PrintLayoutSettings PrintLayout = new CrystalDecisions.Shared.PrintLayoutSettings();
    CrystalDecisions.ReportAppServer.ReportDefModel.PrintOptions RASPO = new CrystalDecisions.ReportAppServer.ReportDefModel.PrintOptions();
    CrystalDecisions.ReportAppServer.ReportDefModel.PageMargins crMarg = new CrystalDecisions.ReportAppServer.ReportDefModel.PageMargins();

    See if my Printer test app works for you:

    Printing Crystal Reports in .NET

    Open a report with saved data, select the printer from the drop down list, Click the Set Printer button and it should print using POC.

    You may need to use this as a work around:


    Add a comment
    10|10000 characters needed characters exceeded

    • I tried to download your test app (from KB article 2163438), but I'm getting redirected to a page that says, "You are signed in with a P-user ID. Visitors with an S-user ID will benefit from more tools and enhanced functionality. If you are an SAP customer, contact a user administrator in your company to request such an ID." I haven't personally bought anything from SAP (I've only downloaded the free Crystal Reports for VS), but someone else at my company just bought a couple of Crystal 2020 licenses, so I asked him if he had an "S-user ID", but apparently he has a P-user ID too. I think he's trying to contact support to ask about how to get an S-user ID.

      In any case, I'd be glad to try out the test app if I could get a hold of it :)

  • Posted on Aug 25 at 04:56 PM

    Hi David,

    Looking at the description for what WSD is I found this:

    It's a service, so CR isn't going to be able to use it, CR requires a real port, not a service redirecting the output.

    CR is based on C++ technology and DEVMODE structure.

    I'm curious if it works in Crystal Reports Designer?


    Add a comment
    10|10000 characters needed characters exceeded

    • WSD stands for "Web Services on Devices", but as far as I know, that doesn't mean there's a service in the sense that you're using it. There's no Windows service for it in services.msc, for example. It seems to be more of a standardized network protocol for talking to network printers. And as I mentioned, I'm able to print to other printers, such as the Brother HL-L8260CDW, when it's configured to use a WSD port.

      I can print to the HL-L2370DW using WSD with Crystal Designer, and also by using ReportDocument.PrintToPrinter(). It's just PrintOutputController.PrintReport() that fails.

      If it'd be helpful, I could probably make the network printer available over the Internet to someone at SAP if they'd like to try things out themselves.

  • Posted on Sep 09 at 04:30 PM

    Hi David,

    So Go to the WIKI, I fixed the link, this one should work for you now:


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.