Пример #1
0
        private void LoadReport()
        {
            try
            {
                reportViewer1.ProcessingMode = ProcessingMode.Local;
                datatable = objRPDBatch_DL.GetWIP_RPD(WIPDate);

                ReportDataSource source1 = new ReportDataSource();
                source1.Name  = "DataSet1";
                source1.Value = datatable;

                // #region Report Parameters
                // ReportParameter p1 = new ReportParameter("SupervisorName", SupervisorName);
                // reportViewer1.LocalReport.SetParameters(p1);

                // ReportParameter p2 = new ReportParameter("SectionID", SectionName);
                // reportViewer1.LocalReport.SetParameters(p2);

                // #endregion

                reportViewer1.LocalReport.DataSources.Clear();
                reportViewer1.LocalReport.DataSources.Add(source1);


                reportViewer1.LocalReport.Refresh();
                reportViewer1.RefreshReport();
            }
            catch (Exception ee)
            {
                MessageBox.Show(this, ee.Message.ToString(), "Error Loading the Report", MessageBoxButtons.OK);
            }
        }
Пример #2
0
 private void LoadData()
 {
     dgvWIP_PRPD.AutoGenerateColumns = false;
     dt = objRPDBatch_DL.GetWIP_RPD(dateTimePicker1.Value);
     bsWIP_PRPD.DataSource  = dt;
     dgvWIP_PRPD.DataSource = bsWIP_PRPD;
     bsWIP_PRPD.ResetBindings(true);
 }