Printing to Defined Printer

2 posts, 0 answers
  1. Chris
    Chris avatar
    16 posts
    Member since:
    Aug 2012

    Posted 15 Feb 2016 Link to this post

    I have a program that gets some data from a database and prints a report to a printer on schedule. It runs unattended so there can never be user input. I have it printing to the default printer, but I'd like to print to a defined network printer (\\servername\printername). 


    How can I code that?

  2. Stef
    Stef avatar
    3610 posts

    Posted 17 Feb 2016 Link to this post

    Hello Chris,

    You can print a report programmatically by using a ReportProcessor. The ReportProcessor.PrintReport method expects PrinterSettings which has to be valid to avoid popping a modal dialog, if the operation is executed by a service. The PrinterSettings properties allow you to specify any connected to the machine printer (PrinterSettings.PrinterName)..

    More settings required for using a network printer are discussed in forums like stackoverflow e.g. PrintDocument.PrinterSettings.PrinterName \\servername\printername Not Available.

    I hope this information helps.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top