none
PrintSettings in RDLC Winforms showing black dots only in print layout RRS feed

  • Question

  • I creating a report in rdlc in winforms. This is working properly. But after i add the page settings to the report viewer the print layout view not showing properly. Only black dots showing. When i comment the page settings it is working properly.

    My report binding coding are below

    this.reportViewer1.Width = this.Width - 15;
                this.reportViewer1.Height = this.Height - 15;
    
                this.reportViewer1.LocalReport.DataSources.Clear();
                this.reportViewer1.LocalReport.ReportEmbeddedResource = "Report1.rdlc";
    
                ReportDataSource rds = new ReportDataSource("DataSet1", CustomerList);
                rds.Value = _deliveryNote.CustomerList;
                this.reportViewer1.LocalReport.DataSources.Add(rds);
    
                System.Drawing.Printing.PageSettings pg = new System.Drawing.Printing.PageSettings();
                pg.Margins.Top = 100;
                pg.Margins.Bottom = 100;
                pg.Margins.Left = 100;
                pg.Margins.Right = 100;
                pg.Landscape = false;
                System.Drawing.Printing.PaperSize size = new PaperSize();
                size.RawKind = (int)PaperKind.A4;
                pg.PaperSize = size;
                this.reportViewer1.SetPageSettings(pg);
    
                this.reportViewer1.LocalReport.Refresh();
                this.reportViewer1.RefreshReport();

    Sunday, December 1, 2013 3:15 AM