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

Use Telerik Reporting for printing from a Windows Service?

5 Answers 246 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 18 Feb 2011, 11:20 AM
I'm looking at possible solutions for printing from a Windows Service (by "service" I mean a continuous UI-less background process, not a web service).

My question is, can I use and print from Telerik Reporting from within a Windows service, and is that a supported/appropriate use of Telerik Reporting?

I'm aware that the System.Drawing.Printing classes are not supported / not available within a Windows service. I want to check whether that's the case for the Telerik DLLs. I've looked through the documentation and the support forum but I can't see any evidence indicating support or lack of it.

Thanks,

Chris N

5 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 23 Feb 2011, 12:44 PM
Hi Chris,

You can print/export from Windows Service using the respective server side method - ReportProcessor.Print Method. However you will have to set up a default printer to avoid the modal dialogs. About the System.Drawing.Printing namespace, most probably its absent due to a missing reference to the System.Drawing assembly.

Best wishes,
Peter
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
qakmak
Top achievements
Rank 1
answered on 08 Jul 2015, 01:57 PM

Hi Peter, I can't understand what you mean about : "However you will have to set up a default printer to avoid the modal dialogs. "

Is that necessary? How about there is have multiple printer connect to the server. And I need send a print command in the windows service by printer name?  Is that still OK?  Because sound like you mean there is only "default printer " can be used....Or me confused

0
Stef
Telerik team
answered on 13 Jul 2015, 08:49 AM
Hello Qakmak,

If the provided PrinterSettings are not valid, there will appear a modal dialog, which is not allowed to be popped by the windows service. Check the example in the Telerik Reporting Print Dialog Box forum thread.

You are not limited to the default printer for the machine, but you will have to verify that the set printer settings are correct and allow the ReportProcessor to send the document to the printer machine.

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
0
qakmak
Top achievements
Rank 1
answered on 14 Jul 2015, 02:34 AM
So what you mean is :"only default printer can use, and can't choice a printer by printer name when print report". Right?
0
Stef
Telerik team
answered on 16 Jul 2015, 11:21 AM
Hello qakmak,

You will be able to specify any printer connected to the server machine, as long as the PrinterSettings properties are full and do not cause the application to popup additional dialogs for gathering more printer information that is not initially provided.

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
Peter
Telerik team
qakmak
Top achievements
Rank 1
Stef
Telerik team
Share this question
or