private void ViewAllOEEDetails() { lock (thisLock) { try { DBServer db = new DBServer(); ds = db.efficiencycal(db); // ds = objserver.GetDateset("select doc_ref,Rev,businessunit,parttype,operation,specificpartorcommon,typeofdocument,creationdate,revisiondate,status,comments,functioninchargeoffilling ,paperfilling ,durationoffilling ,storageplacefilling ,electronicsfilling ,methodoffilling ,protectagainstwaterfilling ,funinchargeof ,paper ,electronics ,durationofarchiving ,archivingplace ,authorized ,notauthorized ,functioninchargeofdestruction ,methodOfDestruction from dbo.DMT_Template where specificpartorcommon=" + Convert.ToString(this.DropPartNo.Text) + ""); if (ds.Tables[0].Rows.Count > 0) { LocalReport lr = null; DataSet ds1 = new DataSet(); ReportViewer1.ProcessingMode = ProcessingMode.Local; lr = ReportViewer1.LocalReport; lr.ReportPath = "Reports/Report5.rdlc"; //lr.DataSources.Add(new ReportDataSource("efficiencycal", ds.Tables[0])); ReportDataSource rds = new ReportDataSource("DataSet1_ViewAllEfficiencyCal", ds.Tables[0]); ReportViewer1.LocalReport.DataSources.Clear(); ReportViewer1.LocalReport.DataSources.Add(rds); ReportViewer1.LocalReport.Refresh(); } else { // ReportViewer1.LocalReport.DataSources.Clear(); ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record Not Found');", true); } } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex); Label3.Text = ex.Message; if (Label3.Text != "An invalid parameter or option was specified for procedure 'No already Exists'.") { Label3.Text = "Record Not Found"; } } finally { } } }