Exemple #1
0
 private void btnPrint_Click(object sender, RoutedEventArgs e)
 {
     mReportViewer.LocalReport.DisplayName = Title + " " + DateTime.Now.ToString("yyyy-MM-dd HHmmss");
     mReportViewer.PrinterSettings.DefaultPageSettings.PaperSize.RawKind = (int)System.Drawing.Printing.PaperKind.A4;
     mReportViewer.PrinterSettings.DefaultPageSettings.Margins           = new System.Drawing.Printing.Margins(50, 50, 50, 50);
     mReportViewer.PrinterSettings.DefaultPageSettings.Landscape         = Landscape;
     mReportViewer.PrintDialog();
 }
 void reportViewer1_RenderingComplete(object sender, Microsoft.Reporting.WinForms.RenderingCompleteEventArgs e)
 {
     frm.Visible = false;
     RV.PrintDialog();
     frm.Hide();
 }