From b94271a37405efe2b510311aee6dc1a147901dbe Mon Sep 17 00:00:00 2001 From: Marcel Hirschle Date: Tue, 31 Jan 2023 11:46:42 +0100 Subject: [PATCH] =?UTF-8?q?MH:=20Alzey=20Bedingung=20f=C3=BCr=20ReportCrea?= =?UTF-8?q?tor=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AlzeyTeilhabe/CustomReportCreator.cs | 31 +++++++++ .../StundenzettelBi2.Designer.cs | 66 +++++++++---------- 2 files changed, 64 insertions(+), 33 deletions(-) diff --git a/ReportImp/AlzeyTeilhabe/CustomReportCreator.cs b/ReportImp/AlzeyTeilhabe/CustomReportCreator.cs index 9f20bc0d7..3249913e5 100644 --- a/ReportImp/AlzeyTeilhabe/CustomReportCreator.cs +++ b/ReportImp/AlzeyTeilhabe/CustomReportCreator.cs @@ -44,6 +44,37 @@ namespace AlzeyTeilhabe var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid); return CreateServicesOverviewReportForRo(ro, serviceCategoryOid); } + public override XtraReport CreateServiceOverviewReportForCustomers(IList customerOids, int month, int year, long? orgaOid, long? empOid, long? serviceCategoryOid, int startDay, int endDay, bool nurFehlende) + { + var roList = new List(); + + foreach (var coid in customerOids) + { + var ro = ServicesOverviewRO.Create(coid, month, year, true, orgaOid ?? 0, empOid ?? 0, startDay, endDay, serviceCategoryOid); + if (ro != null) + { + roList.Add(ro); + } + } + + if (roList.Count > 0) + { + + var rootReport = CreateServicesOverviewReportForRo(roList[0], serviceCategoryOid); + rootReport.CreateDocument(); + + for (int i = 1; i < roList.Count; i++) + { + var lNext = CreateServicesOverviewReportForRo(roList[i], serviceCategoryOid); + lNext.CreateDocument(); + rootReport.Pages.AddRange(lNext.Pages); + } + + return rootReport; + } + return new XtraReport(); + + } private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid) { diff --git a/ReportImp/AlzeyTeilhabe/StundenzettelBi2.Designer.cs b/ReportImp/AlzeyTeilhabe/StundenzettelBi2.Designer.cs index e1d8622de..6a98e8304 100644 --- a/ReportImp/AlzeyTeilhabe/StundenzettelBi2.Designer.cs +++ b/ReportImp/AlzeyTeilhabe/StundenzettelBi2.Designer.cs @@ -71,12 +71,12 @@ namespace AlzeyTeilhabe this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); this.xrTable1 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); - this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldBillableFLS = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldAbrechenbareFLS = new DevExpress.XtraReports.UI.CalculatedField(); @@ -88,12 +88,12 @@ namespace AlzeyTeilhabe this.xrTable3 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow4 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell(); + this.ruleLetzteZeile = new DevExpress.XtraReports.UI.FormattingRule(); this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell17 = new DevExpress.XtraReports.UI.XRTableCell(); this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); - this.ruleLetzteZeile = new DevExpress.XtraReports.UI.FormattingRule(); this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); @@ -545,6 +545,28 @@ namespace AlzeyTeilhabe this.xrLabel3.SizeF = new System.Drawing.SizeF(689.9999F, 23F); this.xrLabel3.Text = "xrLabel3"; // + // xrLabel2 + // + this.xrLabel2.Borders = DevExpress.XtraPrinting.BorderSide.Top; + this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(346.1668F, 231.1668F); + this.xrLabel2.Name = "xrLabel2"; + this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel2.SizeF = new System.Drawing.SizeF(340.8333F, 17.99997F); + this.xrLabel2.StylePriority.UseBorders = false; + this.xrLabel2.StylePriority.UseFont = false; + this.xrLabel2.Text = "Unterschrift Rechnungsstelle / Fachkraft"; + // + // xrLabel5 + // + this.xrLabel5.Borders = DevExpress.XtraPrinting.BorderSide.Top; + this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0.0002034505F, 231.1668F); + this.xrLabel5.Name = "xrLabel5"; + this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel5.SizeF = new System.Drawing.SizeF(117.2917F, 17.99997F); + this.xrLabel5.StylePriority.UseBorders = false; + this.xrLabel5.StylePriority.UseFont = false; + this.xrLabel5.Text = "Datum"; + // // xrTable1 // this.xrTable1.BorderColor = System.Drawing.Color.Black; @@ -597,28 +619,6 @@ namespace AlzeyTeilhabe this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell6.Weight = 0.12626260328760389D; // - // xrLabel2 - // - this.xrLabel2.Borders = DevExpress.XtraPrinting.BorderSide.Top; - this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(346.1668F, 231.1668F); - this.xrLabel2.Name = "xrLabel2"; - this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel2.SizeF = new System.Drawing.SizeF(340.8333F, 17.99997F); - this.xrLabel2.StylePriority.UseBorders = false; - this.xrLabel2.StylePriority.UseFont = false; - this.xrLabel2.Text = "Unterschrift Rechnungsstelle / Fachkraft"; - // - // xrLabel5 - // - this.xrLabel5.Borders = DevExpress.XtraPrinting.BorderSide.Top; - this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0.0002034505F, 231.1668F); - this.xrLabel5.Name = "xrLabel5"; - this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel5.SizeF = new System.Drawing.SizeF(117.2917F, 17.99997F); - this.xrLabel5.StylePriority.UseBorders = false; - this.xrLabel5.StylePriority.UseFont = false; - this.xrLabel5.Text = "Datum"; - // // fieldAbrechenbareMinuten // this.fieldAbrechenbareMinuten.DataMember = "Services"; @@ -714,6 +714,14 @@ namespace AlzeyTeilhabe this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; this.xrTableCell13.Weight = 0.12626259807949769D; // + // ruleLetzteZeile + // + this.ruleLetzteZeile.Condition = "[IstSonntag]"; + this.ruleLetzteZeile.DataMember = "Services"; + this.ruleLetzteZeile.Formatting.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.ruleLetzteZeile.Name = "ruleLetzteZeile"; + // // xrTableCell14 // this.xrTableCell14.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right))); @@ -769,14 +777,6 @@ namespace AlzeyTeilhabe this.GroupFooter1.HeightF = 40F; this.GroupFooter1.Name = "GroupFooter1"; // - // ruleLetzteZeile - // - this.ruleLetzteZeile.Condition = "[IstSonntag]"; - this.ruleLetzteZeile.DataMember = "Services"; - this.ruleLetzteZeile.Formatting.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) - | DevExpress.XtraPrinting.BorderSide.Bottom))); - this.ruleLetzteZeile.Name = "ruleLetzteZeile"; - // // bindingSource1 // this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);