C # RDLC record

FIG achieved under the effect of:

        private void Form1_Load(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("ID");
            dt.Columns.Add("Name");
            dt.Columns.Add("ObjIndex");
            DataRow row;

            for (int i = 1; i <= 10; i++)
            {
                row = dt.NewRow();
                row["ID"] = Guid.NewGuid();
                row["Name"] = "小黄" + i;
                row["ObjIndex"] = i;
                dt.Rows.Add(row);
            }
            ReportDataSource reportDataSource = new ReportDataSource();

            reportDataSource.Name = "DataSet1";
            reportDataSource.Value = dt;

            reportViewer1.Reset();
            reportViewer1.LocalReport.ReportPath = "../../Report2.rdlc";
            reportViewer1.LocalReport.DataSources.Add(reportDataSource);
            reportViewer1.RefreshReport();
        }

 Note RDLC settings:

 

 Setting a first frame, to the second operator '=' sign on the line, to change the contrast attention integer 

 

Using the principle of the display data to the odd and even groups

This article used to be a record conveniently forgot their future can view ....

 

Guess you like

Origin www.cnblogs.com/IT-Ramon/p/12461946.html