private void LoadReport() { try { rptViewer.ProcessingMode = ProcessingMode.Local; //if (StoreID == "Packing") //{ // dt = objMR_DL.GetMR_BulkPrint_Material_Packing(StoreID,(int)MR.Origin.ToBatch,MR.Status.Issued,MR.Status.Recevied,MR.Status.ReceviedGRN,MR.Status.ReceviedSubStock); //} //else //{ dt = objMR_DL.GetMR_BulkPrint_Material(StoreID, MR.Status.Issued, MR.Status.Recevied, MR.Status.ReceviedGRN, MR.Status.ReceviedSubStock); //} ReportDataSource source1 = new ReportDataSource(); source1.Name = "dsReports"; source1.Value = dt; #region Report Parameters ReportParameter p1 = new ReportParameter("StoreID", StoreID); rptViewer.LocalReport.SetParameters(p1); ReportParameter p2 = new ReportParameter("UserID", CurrentUser.EmployeeID); rptViewer.LocalReport.SetParameters(p2); #endregion // rptViewer.LocalReport.ReportEmbeddedResource = null; rptViewer.LocalReport.DataSources.Clear(); rptViewer.LocalReport.DataSources.Add(source1); rptViewer.LocalReport.Refresh(); rptViewer.RefreshReport(); } catch (Exception ee) { MessageBox.Show(this, ee.Message.ToString(), "Error Loading the Report", MessageBoxButtons.OK); } }