//ART public ActionResult ART(string FacilityCode, string sdate, string edate) { int x = 0; //Boolean y = false; ReportsModel obj = new ReportsModel(); if (int.TryParse(FacilityCode, out x)) { obj.FacilityCode = System.Convert.ToInt32(FacilityCode); } DateTime?StartDate = DateTime.ParseExact(sdate, "dd/MM/yyyy", null); DateTime?EndDate = DateTime.ParseExact(edate, "dd/MM/yyyy", null); obj.StartDate = StartDate; obj.EndDate = EndDate; Microsoft.Reporting.WebForms.ReportViewer reportViewer = new Microsoft.Reporting.WebForms.ReportViewer(); reportViewer.ProcessingMode = ProcessingMode.Local; reportViewer.SizeToReportContent = true; //reportViewer.Width = Unit.Percentage(900); //reportViewer.Height = Unit.Percentage(900); //List<spView_Admin_Calender_ScheduleAppointmentsGetAll_Result> titles = obj.GetDetailedReport(); reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"\Reports\Report_WebTemplate_ARV.rdlc"; reportViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("ds_consumption", obj.ART().ToList())); reportViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("ds_patients", obj.ART_Patients().ToList())); reportViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("ds_patients_paediatric", obj.ART_Paediatric().ToList())); reportViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("ds_patients_fluconazole", obj.ARV_Fluconazole().ToList())); reportViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("ds_header", obj.ARV_ReportHeader().ToList())); reportViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("ds_extra_regimen", obj.ARV_ReportExtraRegimen().ToList())); ViewBag.ReportViewer = reportViewer; return(View()); }