// SELECT DISTINCTROW MailCode.MailCode, MailCode.Description FROM MailCode ORDER BY MailCode.MailCode; public List <SelectListItem> GetMailCodeList(string[] selectedValues) { using (LitProReadEntities db = new LitProReadEntities()) { var codes = db.Database.SqlQuery <_MailCode>("SELECT MailCode, Description FROM dbo.MailCode ORDER BY MailCode"); //List<SelectListItem> codeList = new List<SelectListItem>(); //foreach (var code in codes) //{ // codeList.Add(new SelectListItem { Value = code.mailcode, Text = code.description }); //} var codeList = from code in codes select new { MailCode = code.mailcode, Description = code.description }; List <SelectListItem> list = new List <SelectListItem>(); foreach (var item in codeList) { list.Add(new SelectListItem { Value = item.MailCode.Trim(), Text = item.Description.Trim(), //Selected = selectedValue == item.Trim() ? true : false }); } return(list); //return new SelectList(codeList, "MailCode", "Description", selectedValues); } }
// SELECT DISTINCTROW Category.Category, Category.Description FROM Category ORDER BY Category.Category; public List <SelectListItem> GetCategoryList(string selectedValue) { using (LitProReadEntities db = new LitProReadEntities()) { var categories = db.Database.SqlQuery <_Category>("SELECT Category, Description FROM dbo.Category ORDER BY Category").ToList(); var catList = from cat in categories select new { Category = cat.category, Description = cat.description }; List <SelectListItem> list = new List <SelectListItem>(); foreach (var item in catList) { list.Add(new SelectListItem { Value = item.Category.Trim(), Text = item.Description.Trim(), //Selected = selectedValue == item.Trim() ? true : false }); } return(list); //return new SelectList(catList, "Category", "Description", selectedValues); } }
// SELECT DISTINCTROW Keyword.Keyword, Keyword.Description FROM Keyword ORDER BY Keyword.Keyword; public List <SelectListItem> GetKeywordList(string selectedValue) { using (LitProReadEntities db = new LitProReadEntities()) { var kws = db.Database.SqlQuery <_Keyword>("SELECT Keyword, Description FROM dbo.Keyword ORDER BY Keyword").ToList(); var kwList = from kw in kws select new { Keyword = kw.keyword, Description = kw.description }; List <SelectListItem> list = new List <SelectListItem>(); foreach (var item in kwList) { list.Add(new SelectListItem { Value = item.Keyword.Trim(), Text = item.Description.Trim(), //Selected = selectedValue == item.Trim() ? true : false }); } return(list); //return new SelectList(kwList, "Keyword", "Description", selectedValues); } }
public List <SelectListItem> GetStudentsFirstName(int Id = -1) //public SelectList GetStudentsFirstName(int Id = -1) { using (LitProReadEntities db = new LitProReadEntities()) { var students = from student in db.Students orderby student.FirstName select new { ID = student.ID, FirstName = student.FirstName + " " + student.LastName }; List <SelectListItem> list = new List <SelectListItem>(); foreach (var student in students) { list.Add(new SelectListItem { Value = student.ID.ToString().Trim(), Text = student.FirstName.Trim(), Selected = student.ID == Id ? true : false }); } return(list); //return new SelectList(students, "ID", "FirstName"); } }
//SELECT Students.FirstName, Students.LastName, Students.FirstActive, Date() AS Today, Students.Status, (DateDiff('m',[FirstActive],Now())) AS WaitTime FROM Students // WHERE (((Students.FirstActive) Between [Forms]![frmDateSelectionStudentStatus]![BeginDate] And [Forms]![frmDateSelectionStudentStatus]![EndDate])); public ActionResult StudentWaitTime(string reportType, string beginDate, string endDate, string statusType) { using (LitProReadEntities db = new LitProReadEntities()) { DateTime date1 = new DateTime(1900, 01, 01); if (beginDate != "") { date1 = DateTime.Parse(beginDate); } DateTime date2 = new DateTime(2025, 12, 31); if (endDate != "") { date2 = DateTime.Parse(endDate); } var wait = from student in db.Students where statusType != "" ? (student.FirstActive >= date1 && student.FirstActive <= date2) && (student.Status.Equals(statusType)) : (student.FirstActive >= date1 && student.FirstActive <= date2) select new { Name = student.LastName + ", " + student.FirstName, student.LastName, student.FirstName, student.FirstActive, student.Status }; if (wait.Count() == 0) { return(RedirectToAction("NoRecord", "Home")); } List <ReportParameter> paramList = new List <ReportParameter>(); paramList.Add(new ReportParameter("BeginDate", date1.ToShortDateString())); //startDate.ToShortDateString())); paramList.Add(new ReportParameter("EndDate", date2.ToShortDateString())); //endDate.ToShortDateString())); paramList.Add(new ReportParameter("StatusType", statusType)); return(RunReport(reportType, "StudentWaitTime.rdlc", "StudentWaitTimeDataSet", wait, paramList, -1, -1, 0.25, 0.25)); } }
// SELECT DISTINCTROW Country.Country FROM Country ORDER BY Country.Country; public List <SelectListItem> GetCountryList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var countries = db.Database.SqlQuery <string>("SELECT Country FROM dbo.Country ORDER BY Country").ToList(); return(ParseList(selected, countries)); } }
// SELECT CallLocation.CallLocation FROM CallLocation ORDER BY CallLocation.CallLocation; public List <SelectListItem> GetCallLocationList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var locs = db.Database.SqlQuery <string>("SELECT CallLocation FROM dbo.CallLocation ORDER BY CallLocation").ToList(); return(ParseList(selected, locs)); } }
// SELECT Income.Income FROM Income ORDER BY Income.Income public List <SelectListItem> GetIncomeList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var income = db.Database.SqlQuery <string>("SELECT Income FROM dbo.Income ORDER BY Income").ToList(); return(ParseList(selected, income)); } }
// SELECT DISTINCTROW Ethnicity.Ethnicity FROM Ethnicity ORDER BY Ethnicity.Ethnicity public List <SelectListItem> GetEthnicityList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var ethnicity = db.Database.SqlQuery <string>("SELECT Ethnicity FROM dbo.Ethnicity ORDER BY Ethnicity").ToList(); return(ParseList(selected, ethnicity)); } }
// SELECT ContactPref.ContactPref FROM ContactPref public List <SelectListItem> GetContactPrefList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var prefs = db.Database.SqlQuery <string>("SELECT ContactPref FROM dbo.ContactPref").ToList(); return(ParseList(selected, prefs)); } }
// SELECT DISTINCTROW AreaCodes.AreaCodes FROM Salutation public List <SelectListItem> GetAreaCodeList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var codes = db.Database.SqlQuery <string>("SELECT AreaCodes FROM dbo.AreaCodes").ToList(); return(ParseList(selected, codes)); } }
// SELECT DISTINCTROW City.City FROM City public List <SelectListItem> GetCityList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var cities = db.Database.SqlQuery <string>("SELECT City FROM dbo.City").ToList(); return(ParseList(selected, cities));// new SelectList(cities); } }
// SELECT DISTINCTROW NativeLanguage.NativeLanguage FROM NativeLanguage; public List <SelectListItem> GetNativeLanguageList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var langs = db.Database.SqlQuery <string>("SELECT NativeLanguage FROM dbo.NativeLanguage").ToList(); return(ParseList(selected, langs)); } }
// SELECT DISTINCT EducationLevel.EducationLevel FROM EducationLevel ORDER BY EducationLevel.EducationLevel; public List <SelectListItem> GetEducationLevelList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var levels = db.Database.SqlQuery <string>("SELECT EducationLevel FROM dbo.EducationLevel ORDER BY EducationLevel").ToList(); return(ParseList(selected, levels)); } }
//SELECT DISTINCT StudentContact.StudentContact FROM StudentContact ORDER BY StudentContact.StudentContact; public List <SelectListItem> GetStudentContactList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var c = db.Database.SqlQuery <string>("SELECT StudentContact FROM dbo.StudentContact ORDER BY StudentContact").ToList(); return(ParseList(selected, c)); } }
//SELECT DISTINCTROW LocationPref.LocationPref FROM LocationPref ORDER BY LocationPref.LocationPref; public List <SelectListItem> GetLocationPrefList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var p = db.Database.SqlQuery <string>("SELECT LocationPref FROM dbo.LocationPref ORDER BY LocationPref").ToList(); return(ParseList(selected, p)); } }
//SELECT DISTINCTROW StudentProgram.Program FROM StudentProgram ORDER BY StudentProgram.Program; public List <SelectListItem> GetStudentProgramList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var program = db.Database.SqlQuery <string>("SELECT Program FROM dbo.StudentProgram ORDER BY Program").ToList(); return(ParseList(selected, program)); } }
//SELECT DISTINCTROW Transportation.Transportation FROM Transportation ORDER BY Transportation.Transportation; public List <SelectListItem> GetTransportationList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var l = db.Database.SqlQuery <string>("SELECT Transportation FROM dbo.Transportation ORDER BY Transportation").ToList(); return(ParseList(selected, l)); } }
//SELECT Status.Status FROM Status; public List <SelectListItem> GetStatusList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var status = db.Database.SqlQuery <string>("SELECT Status FROM dbo.Status").ToList(); return(ParseList(selected, status)); } }
// SELECT Source.Source FROM Source ORDER BY [Source]; public List <SelectListItem> GetSourceList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var source = db.Database.SqlQuery <string>("SELECT Source FROM dbo.Source ORDER BY Source").ToList(); return(ParseList(selected, source)); } }
// SELECT Referral.Referral FROM Referral; public List <SelectListItem> GetReferralList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var refs = db.Database.SqlQuery <string>("SELECT Referral FROM dbo.Referral").ToList(); return(ParseList(selected, refs)); } }
public Student GetStudent(int id) { using (LitProReadEntities db = new LitProReadEntities()) { Student student = db.Students.Find(id); if (student == null) { return(new Student()); } return(student); } }
//SELECT [LastName] & "," & [FirstName] AS Name, Students.FirstName, Students.LastName, tblStatusHistory.* //FROM Students INNER JOIN tblStatusHistory ON Students.ID=tblStatusHistory.ID //WHERE (((tblStatusHistory.StudentorTutor)="Student") And ((tblStatusHistory.StatusDate) Between Forms!frmDateSelection!BeginDate And Forms!frmDateSelection!EndDate)); public ActionResult StudentStatusHistory(string reportType, string beginDate, string endDate, string statusType) { using (LitProReadEntities db = new LitProReadEntities()) { var hist = from student in db.Students join statusHist in db.tblStatusHistories on student.ID equals statusHist.ID where statusHist.StudentorTutor.Equals("Student") && (student.LastName.StartsWith("A")) orderby student.LastName select new { Name = student.LastName + ", " + student.FirstName, student.LastName, student.FirstName, statusHist.StatusDate, statusHist.Status, statusHist.InActiveDate, statusHist.ChangedDateTime, statusHist.ChangedBy }; return(RunReport(reportType, "StudentStatusHistory.rdlc", "StudentStatusHistoryDataSet", hist, null, 11, 8.5, 0.25, 0.25)); } }
public ActionResult GetStudentsName(string searchTerm, int pageSize, int pageNum, bool byLastName) // true: get by last name // false: get by first name { //Get the paged results and the total count of the results for this query. LitProReadEntities db = new LitProReadEntities(); List <Student> students = db.GetStudents(searchTerm, pageSize, pageNum, byLastName); int studentCount = db.GetStudentsCount(searchTerm, pageSize, pageNum); //Translate the attendees into a format the select2 dropdown expects Select2PagedResult pagedStudents = ToSelect2Format(students, studentCount, byLastName); //Return the data as a jsonp result return(new JsonpResult { Data = pagedStudents, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
// SELECT DISTINCTROW Salutation.Salutation FROM Salutation public List <SelectListItem> GetSalutationList(string selected = "") { using (LitProReadEntities db = new LitProReadEntities()) { var salutations = db.Database.SqlQuery <string>("SELECT Salutation FROM dbo.Salutation").ToList(); string selectedValue = selected != null?selected.Trim() : ""; List <SelectListItem> list = new List <SelectListItem>(); foreach (var sal in salutations) { list.Add(new SelectListItem { Text = sal.Trim(), Value = sal.Trim(), //Selected = selectedValue == sal.Trim() ? true : false }); } return(list);// new SelectList(list.ToList(), "Value", "Text"); } }
//[ValidateAntiForgeryToken] public ActionResult Edit(StudentFormViewModel studentFormVm)//string dataO) { if (ModelState.IsValid) { using (LitProReadEntities db = new LitProReadEntities()) { db.Configuration.ValidateOnSaveEnabled = true; db.Entry(studentFormVm.CurrentStudent).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbEntityValidationException ex) { string err = ex.Message; int i = 0; i++; } catch (OptimisticConcurrencyException ex) { string err = ex.Message; int i = 0; i++; //studentFormVm.db.Refresh(RefreshMode.ClientWins, studentFormVm.CurrentStudent); //studentFormVm.db.SaveChanges(); } //return View("Forms", studentFormVm); //return RedirectToAction("Index", new { Id = studentFormVm.CurrentStudent.ID }); // PartialView("_Student-General-View", studentFormVm); } } return(View("Forms", studentFormVm)); //JsonResult jsonData = new JsonResult(); //jsonData.Data = studentFormVm; //jsonData.JsonRequestBehavior = JsonRequestBehavior.AllowGet; ////return jsonData; //return Json(new { msg = "Successfully saved " + studentFormVm.CurrentStudent.LastName }); }
public List <SelectListItem> GetStudentsLastName(int Id = -1) //public SelectList GetStudentsLastName(int Id = -1) { using (LitProReadEntities db = new LitProReadEntities()) { //var students = (from student in db.Students // orderby student.LastName // select student) // .AsEnumerable() // .Select( x => new // { // ID = x.ID, // LastName = string.Format("{0, -5} {1, -5}", x.LastName, x.FirstName) //student.LastName + ", " + student.FirstName // }); var students = from student in db.Students orderby student.LastName select new { ID = student.ID, LastName = student.LastName + ", " + student.FirstName }; List <SelectListItem> list = new List <SelectListItem>(); foreach (var student in students) { list.Add(new SelectListItem { Value = student.ID.ToString().Trim(), Text = student.LastName.Trim(), Selected = student.ID == Id ? true : false }); } return(list); //return new SelectList(students, "ID", "LastName");//, selectedValues); // return new SelectList(students, "ID", "LastName");//, selectedValues); } }
private ActionResult RunReport(string reportType, string reportName, string dataSetname, object dataSourceValue, List <ReportParameter> paramList, double width = -1, double height = -1, double horzMargin = -1, double vertMargin = -1) { LocalReport lr = new LocalReport(); string path = Path.Combine(Server.MapPath("~/Reports/rdlc"), reportName); if (System.IO.File.Exists(path)) { lr.ReportPath = path; } else { return(View("Index")); } //List<StateArea> cm = new List<StateArea>(); using (LitProReadEntities db = new LitProReadEntities()) { ReportDataSource rd = new ReportDataSource(); rd.Name = dataSetname; rd.Value = dataSourceValue; lr.DataSources.Add(rd); if (paramList != null) { lr.SetParameters(paramList); } string mimeType; string encoding; string fileNameExtension; string w = (width == -1 ? 8.5 : width).ToString(); string h = (height == -1 ? 11 : height).ToString(); string hm = (horzMargin == -1 ? 1 : horzMargin).ToString(); string vm = (vertMargin == -1 ? 1 : vertMargin).ToString(); string deviceInfo = "<DeviceInfo>" + " <OutputFormat>" + reportType + "</OutputFormat>" + " <PageWidth>" + w + "in</PageWidth>" + " <PageHeight>" + h + "in</PageHeight>" + " <MarginTop>" + vm + "in</MarginTop>" + " <MarginLeft>" + hm + "in</MarginLeft>" + " <MarginRight>" + hm + "in</MarginRight>" + " <MarginBottom>" + vm + "in</MarginBottom>" + "</DeviceInfo>"; Warning[] warnings; string[] streams; byte[] renderedBytes; renderedBytes = lr.Render( reportType, deviceInfo, out mimeType, out encoding, out fileNameExtension, out streams, out warnings); return(File(renderedBytes, mimeType)); } }
// // GET: /Reports/ // CLLS public ActionResult CLLS(string reportType = "PDF", string beginDate = "", string endDate = "", string AdultLearnersFromPriorPeriod = "", string AdultLearnersBegan = "", string AdultLearnersReceived = "", string AdultLearnersLeft = "", string AdultLearnersRemaining = "", string CumulativeTotal = "", string AdultsReferredToOtherPrograms = "", string AdultLearnersAwaitingInstruction = "", string AdultLearnersInstructionHours = "", string BooksGiven = "") { using (LitProReadEntities db = new LitProReadEntities()) { DateTime date1 = DefaultBeginDate(); if (beginDate != "") { date1 = DateTime.Parse(beginDate); } else { if (DateTime.Now.Month > 6) { date1 = new DateTime(DateTime.Now.Year, 7, 1); } else { date1 = new DateTime(DateTime.Now.Year, 1, 1); } } DateTime date2 = DefaultEndDate(); if (endDate != "") { date2 = DateTime.Parse(endDate); } else { if (DateTime.Now.Month > 6) { date2 = new DateTime(DateTime.Now.Year, 12, 31); } else { date2 = new DateTime(DateTime.Now.Year, 6, 30); } } DateTime today = DateTime.Today; //12/24/2013 int ubUnknown = 15; int lbUnknown = 1; DateTime minUnknown = today.AddYears(-ubUnknown); DateTime maxUnknown = today.AddYears(-lbUnknown); int ub10 = 19; int lb10 = 16; DateTime min10 = today.AddYears(-ub10); DateTime max10 = today.AddYears(-lb10); int ub20 = 29; int lb20 = 20; DateTime min20 = today.AddYears(-ub20); DateTime max20 = today.AddYears(-lb20); int ub30 = 39; int lb30 = 30; DateTime min30 = today.AddYears(-ub30); DateTime max30 = today.AddYears(-lb30); int ub40 = 49; int lb40 = 40; DateTime min40 = today.AddYears(-ub40); //12/24/1964 DateTime max40 = today.AddYears(-lb40); //12/24/1973 int ub50 = 59; int lb50 = 50; DateTime min50 = today.AddYears(-ub50); DateTime max50 = today.AddYears(-lb50); int ub60 = 69; int lb60 = 60; DateTime min60 = today.AddYears(-ub60); DateTime max60 = today.AddYears(-lb60); int ub70 = 999; int lb70 = 70; DateTime min70 = today.AddYears(-ub70); DateTime max70 = today.AddYears(-lb70); var clls = from student in db.Students //where student.FirstActive >= date1 && student.FirstActive <= date2 // group student by new { name1 = student.DOB != null ? System.Data.Objects.SqlClient.SqlFunctions.DateDiff("day", student.DOB, DateTime.Now) >= 365 * 70 // && student.FirstActive >= date1 && student.FirstActive <= date2 && student.Status == "Active" // : false // } into Count_70_Group select new { Count_Asian = db.Students.Count(n => n.Ethnicity == "Asian" && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_Black = db.Students.Count(n => n.Ethnicity == "Black" && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_Latino = db.Students.Count(n => n.Ethnicity == "Hispanic" && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_NativeAmerican = db.Students.Count(n => n.Ethnicity == "Native American" && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_PacificIslander = db.Students.Count(n => n.Ethnicity == "Pacific Islander" && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_White = db.Students.Count(n => n.Ethnicity == "White" && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_Other = db.Students.Count(n => n.Ethnicity == "Other" && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_Unknown = db.Students.Count(n => n.Ethnicity == "Unknown" && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_Age_Unknown = db.Students.Count(n => n.DOB != null && n.DOB >= minUnknown && n.DOB <= maxUnknown && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_10 = db.Students.Count(n => n.DOB != null && n.DOB >= min10 && n.DOB <= max10 && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_20 = db.Students.Count(n => n.DOB != null && n.DOB >= min20 && n.DOB <= max20 && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_30 = db.Students.Count(n => n.DOB != null && n.DOB >= min30 && n.DOB <= max30 && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_40 = db.Students.Count(n => n.DOB != null && n.DOB >= min40 && n.DOB <= max40 && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_50 = db.Students.Count(n => n.DOB != null && n.DOB >= min50 && n.DOB <= max50 && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_60 = db.Students.Count(n => n.DOB != null && n.DOB >= min60 && n.DOB <= max60 && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_70 = db.Students.Count(n => n.DOB != null && n.DOB >= min70 && n.DOB <= max70 && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_Male = db.Students.Count(n => n.Gender == "Male" && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_Female = db.Students.Count(n => n.Gender == "Female" && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), Count_Gender_Unknown = db.Students.Count(n => n.Gender == null && n.FirstActive >= date1 && n.FirstActive <= date2 && n.Status == "Active"), }; if (clls.Count() == 0) { return(RedirectToAction("NoRecord", "Home")); } List <ReportParameter> paramList = new List <ReportParameter>(); paramList.Add(new ReportParameter("BeginDate", beginDate)); paramList.Add(new ReportParameter("EndDate", endDate)); paramList.Add(new ReportParameter("AdultLearnersFromPriorPeriod", AdultLearnersFromPriorPeriod == "" ? "0" : AdultLearnersFromPriorPeriod)); paramList.Add(new ReportParameter("AdultLearnersBegan", AdultLearnersBegan == "" ? "0" : AdultLearnersBegan)); paramList.Add(new ReportParameter("AdultLearnersReceived", AdultLearnersReceived == "" ? "0" : AdultLearnersReceived)); paramList.Add(new ReportParameter("AdultLearnersLeft", AdultLearnersLeft == "" ? "0" : AdultLearnersLeft)); paramList.Add(new ReportParameter("AdultLearnersRemaining", AdultLearnersRemaining == "" ? "0" : AdultLearnersRemaining)); paramList.Add(new ReportParameter("CumulativeTotal", CumulativeTotal == "" ? "0" : CumulativeTotal)); //paramList.Add(new ReportParameter("Count_Asian", clls.First().Count_Asian.ToString())); //paramList.Add(new ReportParameter("Count_Black", clls.First().Count_Black.ToString())); //paramList.Add(new ReportParameter("Count_Latino", clls.First().Count_Latino.ToString())); //paramList.Add(new ReportParameter("Count_NativeAmerican", clls.First().Count_NativeAmerican.ToString())); //paramList.Add(new ReportParameter("Count_PacificIslander", clls.First().Count_PacificIslander.ToString())); //paramList.Add(new ReportParameter("Count_White", clls.First().Count_White.ToString())); //paramList.Add(new ReportParameter("Count_Other", clls.First().Count_Other.ToString())); //paramList.Add(new ReportParameter("Count_Unknown", clls.First().Count_Unknown.ToString())); var Sum_Ethnicity = clls.First().Count_Asian + clls.First().Count_Black + clls.First().Count_Latino + clls.First().Count_NativeAmerican + clls.First().Count_PacificIslander + clls.First().Count_White + clls.First().Count_Other + clls.First().Count_Unknown; paramList.Add(new ReportParameter("Sum_Ethnicity", Sum_Ethnicity.ToString())); //paramList.Add(new ReportParameter("Count_10", clls.First().Count_10.ToString())); //paramList.Add(new ReportParameter("Count_20", clls.First().Count_20.ToString())); //paramList.Add(new ReportParameter("Count_30", clls.First().Count_30.ToString())); //paramList.Add(new ReportParameter("Count_40", clls.First().Count_40.ToString())); //paramList.Add(new ReportParameter("Count_50", clls.First().Count_50.ToString())); //paramList.Add(new ReportParameter("Count_60", clls.First().Count_60.ToString())); //paramList.Add(new ReportParameter("Count_70", clls.First().Count_70.ToString())); //paramList.Add(new ReportParameter("Count_Age_Unknown", clls.First().Count_Age_Unknown.ToString())); var Sum_Age = clls.First().Count_10 + clls.First().Count_20 + clls.First().Count_30 + clls.First().Count_40 + clls.First().Count_50 + clls.First().Count_60 + clls.First().Count_70 + clls.First().Count_Age_Unknown; paramList.Add(new ReportParameter("Sum_Age", Sum_Age.ToString())); //paramList.Add(new ReportParameter("Count_Male", clls.First().Count_Male.ToString())); //paramList.Add(new ReportParameter("Count_Female", clls.First().Count_Female.ToString())); //paramList.Add(new ReportParameter("Count_Gender_Unknown", clls.First().Count_Gender_Unknown.ToString())); var Sum_Gender = clls.First().Count_Male + clls.First().Count_Female + clls.First().Count_Gender_Unknown; paramList.Add(new ReportParameter("Sum_Gender", Sum_Gender.ToString())); paramList.Add(new ReportParameter("AdultsReferredToOtherPrograms", AdultsReferredToOtherPrograms == "" ? "0" : AdultsReferredToOtherPrograms)); paramList.Add(new ReportParameter("AdultLearnersAwaitingInstruction", AdultLearnersAwaitingInstruction == "" ? "0" : AdultLearnersAwaitingInstruction)); paramList.Add(new ReportParameter("AdultLearnersInstructionHours", AdultLearnersInstructionHours == "" ? "0" : AdultLearnersInstructionHours)); paramList.Add(new ReportParameter("BooksGiven", BooksGiven == "" ? "0" : BooksGiven)); return(RunReport(reportType, "CLLS.rdlc", "CLLSDataSet", clls, paramList, -1, -1, 0.25, 0.25)); } }