diff --git a/Report/DefaultReports/Bewertungsstatistik.cs b/Report/DefaultReports/Bewertungsstatistik.cs index 213d5ece1..c8ce6ddbc 100644 --- a/Report/DefaultReports/Bewertungsstatistik.cs +++ b/Report/DefaultReports/Bewertungsstatistik.cs @@ -2,7 +2,8 @@ using System; using BeWo.Report.ReportObjects; using BS.Shared.Core; using System.Data; - +using DevExpress.XtraReports.UI; +using System.Linq; namespace BeWo.Report.DefaultReports { @@ -18,33 +19,30 @@ namespace BeWo.Report.DefaultReports public void SetReportDataSource(BewertungsstatistikRO pRO) { - //JahresReportRO b = new JahresReportRO(); - //b.CreateReport(pRO); + //JahresReportRO b = new JahresReportRO(); + //b.CreateReport(pRO); + + ErstelleBewertungsstatistikTabelle(pRO); - - - this.bindingSource1.DataSource = pRO; + this.bindingSource1.DataSource = pRO; } - /*private DataTable CreateChartData() { - // Create an empty table. - DataTable table = new DataTable("Table1"); + public void ErstelleBewertungsstatistikTabelle(BewertungsstatistikRO pRO) + { + // Spaltenüberschriften erstellen + foreach (var pair in pRO.RatingTypeZuAnzahl) + tableBewertungen.Rows[0].Cells.Add(new XRTableCell() { Text = pair.Key }); - // Add three columns to the table. - table.Columns.Add("Anzahl", typeof(Int32)); - table.Columns.Add("Weiblich", typeof(Int32)); - table.Columns.Add("Männlich", typeof(Int32)); + tableBewertungen.Rows.Add(new XRTableRow()); + foreach (var pair in pRO.RatingTypeZuAnzahl) + tableBewertungen.Rows[1].Cells.Add(new XRTableCell() { Text = pair.Value.ToString() }); - // Add data rows to the table. - table.Rows.Add(new object[] { "1", "Section1", 10 }); - table.Rows.Add(new object[] { "2", "Section2", 20 }); - table.Rows.Add(new object[] { "3", "Section1", 20 }); - table.Rows.Add(new object[] { "4", "Section2", 30 }); - table.Rows.Add(new object[] { "5", "Section1", 15 }); - table.Rows.Add(new object[] { "6", "Section2", 25 }); + tableBewertungen.Rows.Add(new XRTableRow()); + var summeBewertungen = pRO.RatingTypeZuAnzahl.Sum(r2a => r2a.Value); + foreach (var pair in pRO.RatingTypeZuAnzahl) + tableBewertungen.Rows[2].Cells.Add(new XRTableCell() { Text = string.Format("{0:0.00} %", pair.Value / summeBewertungen * 100) }); - return table; - }*/ + } - } + } } diff --git a/Report/DefaultReports/Bewertungsstatistik.designer.cs b/Report/DefaultReports/Bewertungsstatistik.designer.cs index 5e82d62b3..3900af295 100644 --- a/Report/DefaultReports/Bewertungsstatistik.designer.cs +++ b/Report/DefaultReports/Bewertungsstatistik.designer.cs @@ -30,7 +30,10 @@ namespace BeWo.Report.DefaultReports private void InitializeComponent() { this.components = new System.ComponentModel.Container(); + DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark(); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); + this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); this.Title = new DevExpress.XtraReports.UI.XRControlStyle(); this.FieldCaption = new DevExpress.XtraReports.UI.XRControlStyle(); this.PageInfo = new DevExpress.XtraReports.UI.XRControlStyle(); @@ -47,16 +50,14 @@ namespace BeWo.Report.DefaultReports this.DetailReport1 = new DevExpress.XtraReports.UI.DetailReportBand(); this.Detail2 = new DevExpress.XtraReports.UI.DetailBand(); this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); - this.fieldStunden = new DevExpress.XtraReports.UI.CalculatedField(); - this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); this.tableBewertungen = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell(); + this.fieldStunden = new DevExpress.XtraReports.UI.CalculatedField(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.groupBoxArray1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tableBewertungen)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail @@ -72,6 +73,34 @@ namespace BeWo.Report.DefaultReports this.Detail.StylePriority.UseFont = false; this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // + // xrLabel2 + // + this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Verdana", 8.25F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { + new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); + this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 22.4583F); + this.xrLabel2.Name = "xrLabel2"; + this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel2.SizeF = new System.Drawing.SizeF(433.3333F, 19.74996F); + this.xrLabel2.StylePriority.UseFont = false; + this.xrLabel2.StylePriority.UseForeColor = false; + this.xrLabel2.StylePriority.UseTextAlignment = false; + this.xrLabel2.Text = "Zeitraum: [StartDay!dd.MM.yyyy] - [EndDay!dd.MM.yyyy]"; + this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + // + // xrLabel8 + // + this.xrLabel8.Font = new DevExpress.Drawing.DXFont("Verdana", 11.25F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { + new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); + this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrLabel8.Name = "xrLabel8"; + this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel8.SizeF = new System.Drawing.SizeF(665.625F, 22.4583F); + this.xrLabel8.StylePriority.UseFont = false; + this.xrLabel8.StylePriority.UseForeColor = false; + this.xrLabel8.StylePriority.UseTextAlignment = false; + this.xrLabel8.Text = "Wirksamkeitskontrolle"; + this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + // // Title // this.Title.BackColor = System.Drawing.Color.White; @@ -187,53 +216,14 @@ namespace BeWo.Report.DefaultReports this.GroupHeader1.Name = "GroupHeader1"; this.GroupHeader1.StylePriority.UseFont = false; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.BewertungsstatistikRO); - // - // fieldStunden - // - this.fieldStunden.DataMember = "BewertungsstatistikReportTabelleList"; - this.fieldStunden.Expression = "[GesamtzeitInvestiert] / 60"; - this.fieldStunden.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; - this.fieldStunden.Name = "fieldStunden"; - // - // xrLabel2 - // - this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Verdana", 8.25F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { - new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 22.4583F); - this.xrLabel2.Name = "xrLabel2"; - this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel2.SizeF = new System.Drawing.SizeF(433.3333F, 19.74996F); - this.xrLabel2.StylePriority.UseFont = false; - this.xrLabel2.StylePriority.UseForeColor = false; - this.xrLabel2.StylePriority.UseTextAlignment = false; - this.xrLabel2.Text = "Zeitraum: [StartDay!dd.MM.yyyy] - [EndDay!dd.MM.yyyy]"; - this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; - // - // xrLabel8 - // - this.xrLabel8.Font = new DevExpress.Drawing.DXFont("Verdana", 11.25F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { - new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); - this.xrLabel8.Name = "xrLabel8"; - this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel8.SizeF = new System.Drawing.SizeF(665.625F, 22.4583F); - this.xrLabel8.StylePriority.UseFont = false; - this.xrLabel8.StylePriority.UseForeColor = false; - this.xrLabel8.StylePriority.UseTextAlignment = false; - this.xrLabel8.Text = "Wirksamkeitskontrolle"; - this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - // // tableBewertungen // - this.tableBewertungen.LocationFloat = new DevExpress.Utils.PointFloat(0F, 10.00001F); + this.tableBewertungen.LocationFloat = new DevExpress.Utils.PointFloat(0F, 10.00004F); this.tableBewertungen.Name = "tableBewertungen"; this.tableBewertungen.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F); this.tableBewertungen.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow1}); - this.tableBewertungen.SizeF = new System.Drawing.SizeF(100F, 25F); + this.tableBewertungen.SizeF = new System.Drawing.SizeF(154.6875F, 25F); // // xrTableRow1 // @@ -246,7 +236,19 @@ namespace BeWo.Report.DefaultReports // this.xrTableCell1.Multiline = true; this.xrTableCell1.Name = "xrTableCell1"; - this.xrTableCell1.Weight = 1D; + this.xrTableCell1.Text = "cell1"; + this.xrTableCell1.Weight = 0.5D; + // + // fieldStunden + // + this.fieldStunden.DataMember = "BewertungsstatistikReportTabelleList"; + this.fieldStunden.Expression = "[GesamtzeitInvestiert] / 60"; + this.fieldStunden.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; + this.fieldStunden.Name = "fieldStunden"; + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.BewertungsstatistikRO); // // Bewertungsstatistik // @@ -271,9 +273,11 @@ namespace BeWo.Report.DefaultReports this.PageInfo, this.DataField}); this.Version = "23.2"; + xrWatermark1.Id = "Watermark1"; + this.Watermarks.Add(xrWatermark1); ((System.ComponentModel.ISupportInitialize)(this.groupBoxArray1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tableBewertungen)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); } diff --git a/Report/ReportObjects/BewertungsstatistikRO.cs b/Report/ReportObjects/BewertungsstatistikRO.cs index 2979156dc..d5c6aceb8 100644 --- a/Report/ReportObjects/BewertungsstatistikRO.cs +++ b/Report/ReportObjects/BewertungsstatistikRO.cs @@ -18,6 +18,8 @@ namespace BeWo.Report.ReportObjects public class BewertungsstatistikRO : AbstractBeWoReportObject { public List BewertungsstatistikReportTabelleList { get; set; } + public Dictionary RatingTypeZuAnzahl { get; set; } + public DateTime? StartDay { get; set; } public DateTime? EndDay { get; set; } @@ -42,119 +44,132 @@ namespace BeWo.Report.ReportObjects public static BewertungsstatistikRO Create(DateTime? start, DateTime? end, SupportConceptDC supportConcept, bool inclZeiterfassung, List ausgewaehlteZiele, List scZiele) { var result = new BewertungsstatistikRO(); - + result.RatingTypeZuAnzahl = new Dictionary(); + if (supportConcept == null && ausgewaehlteZiele == null && scZiele == null) { // Hier neu - } - - result.StartDay = start; - result.EndDay = end; - result.ZeiterfassungEinbinden = inclZeiterfassung; - result.SupportConceptDC = supportConcept; - result.BewertungsstatistikReportTabelleList = new List(); - - - List passendeZielBewertungen = new List(); - foreach (var item in scZiele) - { - - foreach (var item2 in item.GoalRatingList) + // Zuerst alle GoalRating holen und in ein Dict packen, damit man schon mal nach der Bewertung sortiert hat + var allGoalRatings = MapperFactory.GoalRatingDC_GoalRating.MapToNewDCs(DAOFactory.GenericDAO.GetAllActive()); + foreach (var rating in allGoalRatings) { - item2.ServiceRecord = new ServiceRecordDC - { - RoundedDuration = 0, - Start = item.StartDate - }; - passendeZielBewertungen.Add(item2); + if (!result.RatingTypeZuAnzahl.ContainsKey(rating.RatingType.DisplayName)) + result.RatingTypeZuAnzahl.Add(rating.RatingType.DisplayName, 0); + + result.RatingTypeZuAnzahl[rating.RatingType.DisplayName]++; } } - if (inclZeiterfassung) + else { - var osi = new OperationsServiceImp(); - var serviceRecordRatings = osi.FetchServiceRecordRatings(supportConcept.SupportConceptOid, null, null, null, start, end); - foreach (var item in serviceRecordRatings) - passendeZielBewertungen.Add(item); - } + result.StartDay = start; + result.EndDay = end; + result.ZeiterfassungEinbinden = inclZeiterfassung; + result.SupportConceptDC = supportConcept; + result.BewertungsstatistikReportTabelleList = new List(); - //List serviceRecords = DAOFactory.SearchDAO.FindServiceRecordsForSupportConcept((long)supportConcept.SupportConceptOid); - - foreach (var ziel in ausgewaehlteZiele) - { - int anzahl = 0; // Zähler für Schnittberechnung und scZiele-Index - - - var datensatz = new BewertungsstatistikReportTabelle(); - datensatz.Zielname = ziel.DisplayName; - datensatz.GesamtzeitInvestiert = 0; - datensatz.BewertungsstatistikZielDetailList = new List(); - - //foreach (var sr in serviceRecords) - //{ - // var detail = new BewertungsstatistikZielDetail(); - - // foreach (var item in passendeZielBewertungen) - // { - // if (item.GoalEntry.ValueListEntryOid == ziel.ValueListEntryOid) - // { - // if (item.ServiceRecord.ServiceRecordOid == sr.Oid && item.GoalRatingOid == null && item.RatingType?.RatingId != null) - // { - // if (item.ServiceRecord.Start >= start && item.ServiceRecord.Start <= end) - // { - // detail.Note = item.RatingType.RatingId.Value; - // anzahl++; // Zähler für Schnittberechnung - // detail.MinutenInvestiert = sr.DurationMinutes; - // detail.Datum = sr.Start; - // passendeZielBewertungen.Remove(item); - // break; - // } - // } - // } - // } - - // if (detail.MinutenInvestiert != 0) - // { - // datensatz.GesamtzeitInvestiert += detail.MinutenInvestiert; - // datensatz.Durchschnitt += detail.Note; - // } - // if (detail.Datum != null) - // datensatz.BewertungsstatistikZielDetailList.Add(detail); - //} - foreach (var item in passendeZielBewertungen) + List passendeZielBewertungen = new List(); + foreach (var item in scZiele) { - //if (item.ServiceRecord.Start.Value.Day >= start.Value.Day && item.ServiceRecord.Start <= end) - //{ - if (item.GoalEntry != null && item.GoalEntry.Equals(ziel)) + foreach (var item2 in item.GoalRatingList) { - var detail = new BewertungsstatistikZielDetail(); - if (item.RatingType != null) + item2.ServiceRecord = new ServiceRecordDC { - detail.Note = item.RatingType.RatingId.Value; - } - - detail.Datum = item.ServiceRecord.Start; - detail.MinutenInvestiert = (double)item.ServiceRecord.RoundedDuration; - datensatz.GesamtzeitInvestiert += detail.MinutenInvestiert; - anzahl++; - datensatz.Durchschnitt += detail.Note; - datensatz.BewertungsstatistikZielDetailList.Add(detail); - + RoundedDuration = 0, + Start = item.StartDate + }; + passendeZielBewertungen.Add(item2); } - //} + } + if (inclZeiterfassung) + { + var osi = new OperationsServiceImp(); + var serviceRecordRatings = osi.FetchServiceRecordRatings(supportConcept.SupportConceptOid, null, null, null, start, end); + foreach (var item in serviceRecordRatings) + passendeZielBewertungen.Add(item); } - datensatz.Durchschnitt /= anzahl; - datensatz.Durchschnitt = Math.Round(datensatz.Durchschnitt, 2); - datensatz.BewertungsstatistikZielDetailList = datensatz.BewertungsstatistikZielDetailList.OrderBy(a => a.Datum).ToList(); - //if(datensatz.GesamtzeitInvestiert != 0) //Falls Ziele ohne Zeitaufwand nicht dargestellt werden sollen - result.BewertungsstatistikReportTabelleList.Add(datensatz); + //List serviceRecords = DAOFactory.SearchDAO.FindServiceRecordsForSupportConcept((long)supportConcept.SupportConceptOid); + foreach (var ziel in ausgewaehlteZiele) + { + int anzahl = 0; // Zähler für Schnittberechnung und scZiele-Index + + + var datensatz = new BewertungsstatistikReportTabelle(); + datensatz.Zielname = ziel.DisplayName; + datensatz.GesamtzeitInvestiert = 0; + datensatz.BewertungsstatistikZielDetailList = new List(); + + //foreach (var sr in serviceRecords) + //{ + // var detail = new BewertungsstatistikZielDetail(); + + // foreach (var item in passendeZielBewertungen) + // { + // if (item.GoalEntry.ValueListEntryOid == ziel.ValueListEntryOid) + // { + // if (item.ServiceRecord.ServiceRecordOid == sr.Oid && item.GoalRatingOid == null && item.RatingType?.RatingId != null) + // { + // if (item.ServiceRecord.Start >= start && item.ServiceRecord.Start <= end) + // { + // detail.Note = item.RatingType.RatingId.Value; + // anzahl++; // Zähler für Schnittberechnung + // detail.MinutenInvestiert = sr.DurationMinutes; + // detail.Datum = sr.Start; + // passendeZielBewertungen.Remove(item); + // break; + // } + // } + // } + // } + + // if (detail.MinutenInvestiert != 0) + // { + // datensatz.GesamtzeitInvestiert += detail.MinutenInvestiert; + // datensatz.Durchschnitt += detail.Note; + // } + // if (detail.Datum != null) + // datensatz.BewertungsstatistikZielDetailList.Add(detail); + //} + foreach (var item in passendeZielBewertungen) + { + + //if (item.ServiceRecord.Start.Value.Day >= start.Value.Day && item.ServiceRecord.Start <= end) + //{ + if (item.GoalEntry != null && item.GoalEntry.Equals(ziel)) + { + var detail = new BewertungsstatistikZielDetail(); + if (item.RatingType != null) + { + detail.Note = item.RatingType.RatingId.Value; + } + + detail.Datum = item.ServiceRecord.Start; + detail.MinutenInvestiert = (double)item.ServiceRecord.RoundedDuration; + datensatz.GesamtzeitInvestiert += detail.MinutenInvestiert; + anzahl++; + datensatz.Durchschnitt += detail.Note; + datensatz.BewertungsstatistikZielDetailList.Add(detail); + + } + //} + } + + datensatz.Durchschnitt /= anzahl; + datensatz.Durchschnitt = Math.Round(datensatz.Durchschnitt, 2); + datensatz.BewertungsstatistikZielDetailList = datensatz.BewertungsstatistikZielDetailList.OrderBy(a => a.Datum).ToList(); + + //if(datensatz.GesamtzeitInvestiert != 0) //Falls Ziele ohne Zeitaufwand nicht dargestellt werden sollen + result.BewertungsstatistikReportTabelleList.Add(datensatz); + } + + result.BewertungsstatistikReportTabelleList = result.BewertungsstatistikReportTabelleList.OrderBy(b => b.Zielname).ToList(); } - result.BewertungsstatistikReportTabelleList = result.BewertungsstatistikReportTabelleList.OrderBy(b => b.Zielname).ToList(); + return result; } diff --git a/ReportImp/Mittelpunkt/CustomReportCreator.cs b/ReportImp/Mittelpunkt/CustomReportCreator.cs index 0e2212f35..0bd7bdb7f 100644 --- a/ReportImp/Mittelpunkt/CustomReportCreator.cs +++ b/ReportImp/Mittelpunkt/CustomReportCreator.cs @@ -1,39 +1,56 @@ -using System.Collections.Generic; -using BeWo.Report; -using BeWo.Report.ReportObjects; +using System; +using System.Collections.Generic; +using BeWo.Report; +using BeWo.Report.ReportObjects; using BS.Shared.Extensions; -using DevExpress.XtraReports.UI; - -namespace Mittelpunkt +using DevExpress.XtraReports.UI; + +namespace Mittelpunkt { - public class CustomReportCreator : DefaultReportCreator - { - public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay) - { - List lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid, false); - - if (lROs.Count > 0) - { + public class CustomReportCreator : DefaultReportCreator + { + public override XtraReport CreateQueryReport(long queryOid, string queryReportId) + { + if (queryOid == 11) + { + var ro = base.CreateQueryRO(queryOid, queryReportId); + + if (DateTime.TryParse(ro.Rows[0].Field1.ToString(), out var datum)) + { + return CreateBewertungsstatistikReport(datum, new DateTime(datum.Year, 12, 31), null, false, null, null); + } + } + + return base.CreateQueryReport(queryOid, queryReportId); + } + + + public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay) + { + List lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid, false); + + if (lROs.Count > 0) + { var rootReport = CreateServicesOverviewReportForRo(lROs[0], serviceCategoryOid); if (rootReport.Pages.Count == 0) { rootReport.CreateDocument(); } - for (int i = 1; i < lROs.Count; i++) - { + for (int i = 1; i < lROs.Count; i++) + { var lNext = CreateServicesOverviewReportForRo(lROs[i], serviceCategoryOid); if (lNext.Pages.Count == 0) { lNext.CreateDocument(); } - rootReport.Pages.AddRange(lNext.Pages); - } - - return rootReport; - } - return new XtraReport(); + rootReport.Pages.AddRange(lNext.Pages); + } + + return rootReport; + } + return new XtraReport(); } public override XtraReport CreateServiceOverviewReportForCustomers(IList customerOids, int month, int year, long? orgaOid, long? empOid, long? serviceCategoryOid, int startDay, int endDay, bool nurFehlende) @@ -65,18 +82,18 @@ namespace Mittelpunkt return new XtraReport(); } - - public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay) - { - var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid); + + public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay) + { + var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid); return CreateServicesOverviewReportForRo(ro, serviceCategoryOid); } - - private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid) - { + + private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid) + { ServicesOverviewRO flsRo = ServicesOverviewRO.CopyFromRO(ro); ServicesOverviewRO assiRo = ServicesOverviewRO.CopyFromRO(ro); @@ -106,8 +123,8 @@ namespace Mittelpunkt if (report == null) report = new XtraReport(); - - return report; + + return report; } public override XtraReport CreateReportForServicesOverviewRo(ServicesOverviewRO ro, string reportId) @@ -139,7 +156,7 @@ namespace Mittelpunkt } } return report; - } - - } -} + } + + } +}