private void RepairSurveyResults() { ReportConfigurations rc = new ReportConfigurations(); rc.LoadReportsFromXml(ReportConfigurationType.User); if (rc.ContainsKey("SexualMedicineAssessmentSurveyResults")) { var report = rc.GetReportById("SexualMedicineAssessmentSurveyResults"); string sql = report.StoredProcedure; string datasetSQL = CacheManager.GetDatasetSQL(Session[SessionKey.DatasetId]); var sqlParams = new Dictionary <string, string> { { "FromDate", FromDate.Value }, // System.Data.SqlTypes.SqlDateTime.MinValue.Value.ToShortDateString() { "ToDate", ToDate.Value } // System.Data.SqlTypes.SqlDateTime.MaxValue.Value.ToShortDateString() }; AdminReportsDa da = new AdminReportsDa(); DataView results = da.GetAdminReport(datasetSQL, sql, sqlParams, false).Tables[0].DefaultView; results.Sort = "[SurveyDate] ASC, [MRN] ASC"; // reset counts totalCount = results.Count; differentCount = 0; SurveyGrid.DataSource = results; SurveyGrid.DataBind(); // set counts: should be updated on data bound TotalCount.Text = totalCount.ToString(); DifferentCount.Text = differentCount.ToString(); } }
private void BuildReportsDropDown() { // build dorp down ReportConfigurations reportConfigurations = new ReportConfigurations(); reportConfigurations.LoadReportsFromXml(ReportConfigurationType.User); var dropDownItems = from report in reportConfigurations.Reports where report.Module.Replace(" ", "") == QueryModule select report; ReportsRptr.DataSource = dropDownItems; ReportsRptr.DataBind(); // only show drop down items if they exist ModuleListHolder.Visible = ShowReportDropDown; }