[]
ActiveReports provides access to Print methods to enable printing of Page and Section Reports. You can access Print methods in any of the following ways:
Starting with ActiveReports 20, the default printing engine for desktop viewers is Direct2D. This applies to:
Page/RDLX reports
Section Reports running in CrossPlatform compatibility mode
Direct2D provides improved performance, modern vector rendering, and no dependency on GDI printer drivers.
If your application relies on GDI-specific printing features, such as:
PrinterSettings.PrinterResolutions
PrintDocument.QueryPageSettings
Other GDI-only printer properties or events
you must switch the printing engine to GDI through the application configuration.
The code sample illustrates how to access the print method using the Viewer control.
You can use the Print method of the Viewer class to print a report loaded in the Viewer control. Make sure that the report is loaded completely before Print is executed.
Viewer1.Print(True, True, True)viewer1.Print(true, true, true);SectionDocument and PageDocument types have Print methods that can be used directly on the document object. The following code samples illustrate how to access the print methods that can be used directly on the document object.
Note: The Print method is implemented as an extension method of the PrintExtension.Print method, which is present in the GrapeCity.ActiveReports namespace of GrapeCity.ActiveReports assembly.
In order to access Print method through SectionDocument or PageDocument class, you need to add GrapeCity.ActiveReports.Viewer.Common reference to the project. Also, as mentioned in the code, make sure that you add a reference for the GrapeCity.ActiveReports namespace in your project using Imports (Visual Basic.NET) or using (C#) statement.
Imports GrapeCity.ActiveReportsDim rpt = New SectionReport1()
rpt.Run(False)
Dim sectionDocument = rpt.Document
sectionDocument.Print(True, True, False)using GrapeCity.ActiveReports;var rpt = new SectionReport1();
rpt.Run(false);
var sectionDocument = rpt.Document;
sectionDocument.Print(true, true, false);Imports GrapeCity.ActiveReportsDim file_name As String = "..\..\PageReport1.rdlx"
Dim pageReport As New GrapeCity.ActiveReports.PageReport(New System.IO.FileInfo(file_name))
Dim pageDocument As New GrapeCity.ActiveReports.Document.PageDocument(pageReport)
pageDocument.Print(True, True, False)using GrapeCity.ActiveReports;string file_name = @"..\..\PageReport1.rdlx";
GrapeCity.ActiveReports.PageReport pageReport = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(file_name));
GrapeCity.ActiveReports.Document.PageDocument pageDocument = new GrapeCity.ActiveReports.Document.PageDocument(pageReport);
pageDocument.Print(true, true, false);You can use the Print method of the PrintExtension class to print a report loaded in the Viewer control. Make sure that the report is loaded completely before print is executed. The following code samples illustrate how to access the print method of the PrintExtension class.
Note: The Print method is implemented as an extension method of the PrintExtension.Print method, which is present in the GrapeCity.ActiveReports namespace of GrapeCity.ActiveReports.Viewer.Common assembly.
In order to access Print method through SectionDocument or PageDocument class, you need to add GrapeCity.ActiveReports reference to the project. Also, as mentioned in the code, make sure that you add a reference for the GrapeCity.ActiveReports namespace in your project using Imports (Visual Basic.NET) or using (C#) statement.
GrapeCity.ActiveReports.PrintExtension.Print(sectionDocument, True, True)GrapeCity.ActiveReports.PrintExtension.Print(sectionDocument, true, true);GrapeCity.ActiveReports.PrintExtension.Print(pageDocument, True, True)GrapeCity.ActiveReports.PrintExtension.Print(pageDocument, true, true);