Metoda ReportViewer.PrintDialog —
Displays the Print dialog box.
Przestrzeń nazw: Microsoft.Reporting.WinForms
Zestaw: Microsoft.ReportViewer.WinForms (w Microsoft.ReportViewer.WinForms.dll)
Składnia
'Deklaracja
Public Function PrintDialog As DialogResult
public DialogResult PrintDialog()
public:
DialogResult PrintDialog()
member PrintDialog : unit -> DialogResult
public function PrintDialog() : DialogResult
Wartość zwracana
Typ: DialogResult
Cancel if the user clicked the Cancel button or if the Print event is cancelled; OK if the user clicked the OK button.
Uwagi
Calling this method while the report is being rendered in the control causes an InvalidOperationException to be thrown.
Przykłady
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