Exemplo n.º 1
0
        private void LoadReport()
        {
            try
            {
                reportViewer1.ProcessingMode = ProcessingMode.Local;
                datatable = objPRPDBatch_DL.GetWIP_PRPD(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);
            }
        }
Exemplo n.º 2
0
 private void LoadData()
 {
     dgvWIP_PRPD.AutoGenerateColumns = false;
     dt = objPRPDBatch_DL.GetWIP_PRPD(dateTimePicker1.Value);
     bsWIP_PRPD.DataSource  = dt;
     dgvWIP_PRPD.DataSource = bsWIP_PRPD;
     bsWIP_PRPD.ResetBindings(true);
 }