protected override void OnBeforePrint(PrintEventArgs e) { base.OnBeforePrint(e); ReportLocalizer.Localize(this); tc_World.Text = Localizer.GetLocalized("world") + " :"; fieldStore.Text = string.Format("{0}: {1}", Localizer.GetLocalized("Store"), _Props.StoreName); fieldWorld.Text = _Props.WorldName; if (_Props.WordID <= 0) { tc_World.Text = fieldWorld.Text = string.Empty; } tc_TimeRange.Text += string.Format("{0} {1}:\t{2} - {3}", Localizer.GetLocalized("year"), _Props.Year, _Props.StartDate.ToShortDateString(), _Props.EndDate.ToShortDateString()); switch (_Props.View) { case AbsencePlanningView.YearlyView: _DataTable = new YearTableFactory(AdaptToList(), _Props.Year, _Props.OnlyHolidays, _Props.ShowSummary); xrSubreport.ReportSource = (_Props.IsAustria ? new AbsenceYearlyAustria() as AbsenceYearly : new AbsenceYearly()).Bind(_DataTable as YearTableFactory); break; case AbsencePlanningView.MonthlyView: _DataTable = new MonthTableFactory(AdaptToList(), _Props.Year, _Props.MonthOrWeek, _Props.OnlyHolidays, _Props.ShowSummary); if (PaperKind == PaperKind.A3) { if (_Props.IsAustria) { xrSubreport.ReportSource = new AbsenceQuartlyAustria().Bind(_DataTable as MonthTableFactory); } else { xrSubreport.ReportSource = new AbsenceQartly().Bind(_DataTable as MonthTableFactory); } } else if (_Props.IsAustria) { xrSubreport.ReportSource = new AbsenceQuartlyAustriaA4().Bind(_DataTable as MonthTableFactory); } else { xrSubreport.ReportSource = new AbsenceQuartlyA4().Bind(_DataTable as MonthTableFactory); } break; case AbsencePlanningView.WeeklyView: _DataTable = new WeekTableFactory(AdaptToList(), _Props.Year, _Props.MonthOrWeek); xrSubreport.ReportSource = new AbsenceWeekly(); break; } }
protected override void OnBeforePrint(PrintEventArgs e) { base.OnBeforePrint(e); ReportLocalizer.Localize(this); tc_World.Text = Localizer.GetLocalized("world") + " :"; fieldStore.Text = string.Format("{0}: {1}",Localizer.GetLocalized("Store"), _Props.StoreName); fieldWorld.Text = _Props.WorldName; if (_Props.WordID <= 0) tc_World.Text = fieldWorld.Text = string.Empty; tc_TimeRange.Text += string.Format("{0} {1}:\t{2} - {3}",Localizer.GetLocalized("year"), _Props.Year, _Props.StartDate.ToShortDateString(), _Props.EndDate.ToShortDateString()); switch (_Props.View) { case AbsencePlanningView.YearlyView: _DataTable = new YearTableFactory(AdaptToList(), _Props.Year, _Props.OnlyHolidays, _Props.ShowSummary); xrSubreport.ReportSource = (_Props.IsAustria ? new AbsenceYearlyAustria() as AbsenceYearly : new AbsenceYearly()).Bind(_DataTable as YearTableFactory); break; case AbsencePlanningView.MonthlyView: _DataTable = new MonthTableFactory(AdaptToList(), _Props.Year, _Props.MonthOrWeek, _Props.OnlyHolidays, _Props.ShowSummary); if (PaperKind == PaperKind.A3) if (_Props.IsAustria) xrSubreport.ReportSource = new AbsenceQuartlyAustria().Bind(_DataTable as MonthTableFactory); else xrSubreport.ReportSource = new AbsenceQartly().Bind(_DataTable as MonthTableFactory); else if (_Props.IsAustria) xrSubreport.ReportSource = new AbsenceQuartlyAustriaA4().Bind(_DataTable as MonthTableFactory); else xrSubreport.ReportSource = new AbsenceQuartlyA4().Bind(_DataTable as MonthTableFactory); break; case AbsencePlanningView.WeeklyView: _DataTable = new WeekTableFactory(AdaptToList(), _Props.Year, _Props.MonthOrWeek); xrSubreport.ReportSource = new AbsenceWeekly(); break; } }