Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Displays the Print dialog box.
Namespace: Microsoft.Reporting.WinForms
Assembly: Microsoft.ReportViewer.WinForms (in microsoft.reportviewer.winforms.dll)
Syntax
'Declaration
Public Function PrintDialog As DialogResult
'Usage
Dim instance As ReportViewer
Dim returnValue As DialogResult
returnValue = instance.PrintDialog
public DialogResult PrintDialog ()
public:
DialogResult PrintDialog ()
public DialogResult PrintDialog ()
public function PrintDialog () : DialogResult
Return Value
Cancel if the user clicked the Cancel button or if the Print event is cancelled; OK if the user clicked the OK button.
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