This is a migrated thread and some comments may be shown as answers.

Printing to Defined Printer

1 Answer 348 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 15 Feb 2016, 07:45 PM

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?

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 17 Feb 2016, 06:07 PM
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.

Regards,
Stef
Telerik
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
Tags
General Discussions
Asked by
Chris
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or