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

Printing report without popup window

1 Answer 289 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Iron
Alexander asked on 04 Apr 2017, 01:34 PM

I  try to print reports without any gui (like ReportViewer or Print Dialog), to generate a lot of different documents from code behind. I would like that  users can coninue to work during this process.

I trying to do that  in this way:

Public Sub QuickReportPrint(Config As Config, ReportSource As ReportSource)
       Dim printer = Config.PrinterName

       Dim setting As New PrinterSettings()
       setting.PrinterName = printer
       setting.Copies = Config.CopiesPrint
       If setting.SupportsColor Then
           setting.DefaultPageSettings.Color =true
       End If
       Dim paperSource = GetPaperSource(setting, Config.PaperSource)
       If papaerSource IsNot Nothing Then setting.DefaultPageSettings.PaperSource = paperSource
       Dim processor = New ReportProcessor()
       processor.PrintReport(ReportSource, setting)
   End Sub

 

Unfortunatly, while i'm printing my reports, apears  a  popup windows, like those one in atatched file.

 

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 07 Apr 2017, 10:04 AM
Hello Alexander,

ReportProcessor.PrintReport method internally uses the NET printing API. The PrintDocument.PrintController property default value is an instance of PrintControllerWithStatusDialog and thus a status dialog is shown.

Our suggestion is to set the ReportProcessor.PrintController property to an instance of StandardPrintController.

Regards,
Peter
Telerik by Progress
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
Alexander
Top achievements
Rank 1
Iron
Answers by
Peter
Telerik team
Share this question
or