Share via


ReportViewer.PrintDialog Method

Displays the Print dialog box.

Namespace: Microsoft.Reporting.WinForms
Assembly: Microsoft.ReportViewer.WinForms (in microsoft.reportviewer.winforms.dll)

Syntax

'Declaration
Public Sub PrintDialog
'Usage
Dim instance As ReportViewer

instance.PrintDialog
public void PrintDialog ()
public:
void PrintDialog ()
public void PrintDialog ()
public function PrintDialog ()

Remarks

Calling this method while the report is being rendered in the control causes an InvalidOperationException to be thrown.

Example

private void button1_Click(object sender, EventArgs e)
{
   reportViewer.PrintDialog();
}
Private Sub Button1_Click(ByVal sender As System.Object, _
            ByVal e As System.EventArgs) Handles Button1.Click
   ReportViewer1.PrintDialog()
End Sub

See Also

Reference

ReportViewer Class
ReportViewer Members
Microsoft.Reporting.WinForms Namespace