Invert |
Claude BERNARDINI
04/17/2007 12:17
Printing directly a report without Printer Dialog Box
Hello,
I would like to print directly my report to the default printer, without the Printer Dialog Box.
But with this line :
ReportViewer1.PrintReport()
or with :
ReportViewer1.Actions("Print").ExecuteAction()
the printer dialog box is always displayed.
Is there a way to avoid this display ?
Thank you for your help.
|
Alexey Sarantsev
04/17/2007 19:43
Printing directly a report without Printer Dialog Box
Hello Claude,
PLease see the example at http://www.perpetuumsoftware.com/support/RSS/PrintWithoutPrinterSettingsDialog.zip. I use the following code to print report:
Code: | PerpetuumSoft.Reporting.Components.ReportPrintDocument reportPrintDocument = new PerpetuumSoft.Reporting.Components.ReportPrintDocument();
reportPrintDocument.Source = inlineReportSlot1;
reportPrintDocument.Print();
|
Best regards,
Alexey Sarantsev,
Perpetuum Software team.
|
Claude BERNARDINI
04/18/2007 02:44
Printing directly a report without Printer Dialog Box
OK, it's works !
Thank you very much !
|
Alexey Sarantsev
04/18/2007 18:03
Printing directly a report without Printer Dialog Box
If you have any further questions please do not hesitate to contact me.
Best regards,
Alexey Sarantsev,
Perpetuum Software team.
|
Pooran Prasad
04/14/2011 09:20
Printing directly a report without Printer Dialog Box
Link not working!
Quote: | Hello Claude,
PLease see the example at http://www.perpetuumsoftware.com/support/RSS/PrintWithoutPrinterSettingsDialog.zip. I use the following code to print report:
Code: | PerpetuumSoft.Reporting.Components.ReportPrintDocument reportPrintDocument = new PerpetuumSoft.Reporting.Components.ReportPrintDocument();
reportPrintDocument.Source = inlineReportSlot1;
reportPrintDocument.Print();
|
Best regards,
Alexey Sarantsev,
Perpetuum Software team. |
|
Sergey Kraynov
04/15/2011 00:33
Printing directly a report without Printer Dialog Box
Hello Pooran,
The link is not working but the code is working. Please find more detailed code example below:
Code: | private void reportSlot_RenderCompleted(object sender, EventArgs e)
{
using (PerpetuumSoft.Reporting.View.PreviewForm previewForm = new PerpetuumSoft.Reporting.View.PreviewForm(inlineReportSlot1))
{
previewForm.WindowState = FormWindowState.Maximized;
previewForm.ReportViewer.Actions["Print"].Executing +=
new PerpetuumSoft.Reporting.Windows.Forms.Action.
ExecutingEventHandler(ActionName_Executing);
previewForm.ShowDialog(this);
}
}
void ActionName_Executing(object sender,
PerpetuumSoft.Reporting.Windows.Forms.ExecutingEventArgs e)
{
e.Handled = true;
PerpetuumSoft.Reporting.Components.ReportPrintDocument reportPrintDocument = new PerpetuumSoft.Reporting.Components.ReportPrintDocument();
reportPrintDocument.Source = inlineReportSlot1;
reportPrintDocument.Print();
} |
Best regards,
Perpetuum Software Support Team
|
Stefano Pranzo
04/30/2020 17:50
Printing directly a report without Printer Dialog Box
how to do it from WPF?
I use this code to view the report.
How do I print directly?
Code: | FatturaElettronica = new FatturaElettronicaItem();
FatturaElettronica = pFattureElettroniche;
CurrentReport = new DataSourcesReport("FatturaElettronica", pReport);
CurrentReport.Source.DataSources.Clear();
CurrentReport.Source.DataSources.Add("fattureElettroniche", FatturaElettronica);
mCurrentReport.Source.Prepare(); |
|