////add text to GenerateReport.cshtml
        public ActionResult MakeReport(ReportsHomeVM vm)
        {
            ReportsHomeVM model = new ReportsHomeVM();

            if (vm.ChosenRehearsal == null)
            {
                vm.ChosenRehearsal = new Rehearsal(Globals.rID);
            }

            GetDAL get = new GetDAL();

            get.OpenConnection();

            Rehearsal r = get.GetRehearsalByID(vm.ChosenRehearsal.IntRehearsalID);

            Globals.rID = r.IntRehearsalID;
            //Rehearsal r = vm.ChosenRehearsal;
            List <RehearsalPart> rehearsalPartsForToday = get.GetRehearsalPartsByRehearsal(r);

            model.EventName     = r.Event.StrName;;
            model.GroupName     = r.Event.Group.StrName;
            model.Location      = r.StrLocation;
            model.StartTime     = r.DtmStartDateTime.ToString();
            model.EndTime       = r.DtmEndDateTime.ToString();
            model.RehearsalDate = r.DtmStartDateTime.Date.ToString();

            foreach (RehearsalPart rp in rehearsalPartsForToday)
            {
                rp.AttendancePlanned = get.GetAttendancePlannedByRehearsalPart(rp);
                rp.AttendanceActual  = new List <AttendanceActual>();
                foreach (AttendancePlanned ap in rp.AttendancePlanned)
                {
                    rp.AttendanceActual = rp.AttendanceActual.Concat(get.GetAttendanceActualByPlanned(ap)).ToList();
                }
            }

            model.Notes = r.StrNotes;
            model.LstAllRehearsalParts = rehearsalPartsForToday;

            get.CloseConnection();

            Globals.PDF = model;

            return(View("GenerateReport", model));
        }