'Declaration Public Overloads Sub Print( _ ByVal showPrintDialog As Boolean, _ ByVal showReportProgressControl As Boolean, _ ByVal reportProgressControlOwnedElement As FrameworkElement _ )
public void Print( bool showPrintDialog, bool showReportProgressControl, FrameworkElement reportProgressControlOwnedElement )
Exception | Description |
---|---|
System.InvalidOperationException | The exception will be thrown if you try to export or print a Report that doesn't have any sections. |
Private Sub ExportReport() Dim reportObj As Report = New Report() Dim section As EmbeddedVisualReportSection = New EmbeddedVisualReportSection(XamDataGrid1) reportObj.Sections.Add(section) ' Call export method and put to it file to export without SaveFileDialog reportObj.Export(OutputFormat.XPS, "C:\\export.xps", False) End Sub
private void ExportReport() { Report reportObj = new Report(); EmbeddedVisualReportSection section = new EmbeddedVisualReportSection(XamDataGrid1); reportObj.Sections.Add(section); // Call export method and put to it file to export without SaveFileDialog reportObj.Export(OutputFormat.XPS, "C:\\export.xps", false); }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
Report Class
Report Members
Overload List
ReportProgressControl Class
Export(OutputFormat) Method
Export(OutputFormat,String) Method
Export(OutputFormat,String,Boolean) Method
Export(OutputFormat,Stream) Method
Print Method
Print(Boolean,Boolean,FrameworkElement) Method
ShowPrintDialog Method
GeneratePreview Method