From 872875bcb09d6021350bc53ef439dd3db7ad53dd Mon Sep 17 00:00:00 2001 From: Alexandra Date: Tue, 12 May 2026 16:01:48 +0200 Subject: [PATCH] =?UTF-8?q?CaritasGuenzburgNeuUlm/KorridorUebersicht=20-?= =?UTF-8?q?=20Format=20und=20zus=C3=A4tzlich=20erste=20Seite=20wo=20nur=20?= =?UTF-8?q?die=20=C3=BCberschrittenen=20ausgewiesen=20werden=20SupportOID?= =?UTF-8?q?=3D162631?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomReportCreator.cs | 12 ++- .../KorridorUebersicht.Designer.cs | 89 ++++++++++--------- .../KorridorUebersicht.cs | 26 +++++- 3 files changed, 81 insertions(+), 46 deletions(-) diff --git a/ReportImp/CaritasGuenzburgNeuUlm/CustomReportCreator.cs b/ReportImp/CaritasGuenzburgNeuUlm/CustomReportCreator.cs index 06c3b254d..4581b7e83 100644 --- a/ReportImp/CaritasGuenzburgNeuUlm/CustomReportCreator.cs +++ b/ReportImp/CaritasGuenzburgNeuUlm/CustomReportCreator.cs @@ -33,9 +33,17 @@ namespace CaritasGuenzburgNeuUlm var qro = QueryRO.Create(query, table); var ro = SupportConceptListRO.Create(null, null, null, null, null, false, null, null); + var druckAuffaellig = new KorridorUebersicht(); + druckAuffaellig.SetReportDataSource(ro, filterAbove20Percent: true); + druckAuffaellig.CreateDocument(); + + var ro2 = SupportConceptListRO.Create(null, null, null, null, null, false, null, null); var druck = new KorridorUebersicht(); - druck.SetReportDataSource(ro); - return druck; + druck.SetReportDataSource(ro2); + druck.CreateDocument(); + druckAuffaellig.Pages.AddRange(druck.Pages); + + return druckAuffaellig; } diff --git a/ReportImp/CaritasGuenzburgNeuUlm/KorridorUebersicht.Designer.cs b/ReportImp/CaritasGuenzburgNeuUlm/KorridorUebersicht.Designer.cs index 861116c0c..e083025c7 100644 --- a/ReportImp/CaritasGuenzburgNeuUlm/KorridorUebersicht.Designer.cs +++ b/ReportImp/CaritasGuenzburgNeuUlm/KorridorUebersicht.Designer.cs @@ -55,7 +55,6 @@ namespace CaritasGuenzburgNeuUlm this.xrTableCell31 = new DevExpress.XtraReports.UI.XRTableCell(); this.ruleNotApprovedAndExpiringNext4Months = new DevExpress.XtraReports.UI.FormattingRule(); this.ruleNotApprovedAndExpiringNext8Months = new DevExpress.XtraReports.UI.FormattingRule(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.PageHeader = new DevExpress.XtraReports.UI.PageHeaderBand(); this.xrTable1 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow(); @@ -86,10 +85,11 @@ namespace CaritasGuenzburgNeuUlm this.xrTableCell45 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell46 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell47 = new DevExpress.XtraReports.UI.XRTableCell(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail @@ -153,7 +153,7 @@ namespace CaritasGuenzburgNeuUlm this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 0, 100F); this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow2}); - this.xrTable2.SizeF = new System.Drawing.SizeF(730F, 20F); + this.xrTable2.SizeF = new System.Drawing.SizeF(753.6896F, 20F); this.xrTable2.StylePriority.UseBackColor = false; this.xrTable2.StylePriority.UseBorders = false; this.xrTable2.StylePriority.UseFont = false; @@ -206,7 +206,7 @@ namespace CaritasGuenzburgNeuUlm new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptDetailList.Costbearer")}); this.xrTableCell36.Name = "xrTableCell36"; this.xrTableCell36.Text = "xrTableCell36"; - this.xrTableCell36.Weight = 0.18807353873326235D; + this.xrTableCell36.Weight = 0.38033560091493235D; // // xrTableCell20 // @@ -216,17 +216,19 @@ namespace CaritasGuenzburgNeuUlm this.xrTableCell20.StylePriority.UseTextAlignment = false; this.xrTableCell20.Text = "xrTableCell20"; this.xrTableCell20.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; - this.xrTableCell20.Weight = 0.17530240654142157D; + this.xrTableCell20.Weight = 0.13754616893951627D; // // xrTableCell21 // + this.xrTableCell21.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell21.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptDetailList.EndDate", "{0:dd/MM/yyyy}")}); this.xrTableCell21.Name = "xrTableCell21"; + this.xrTableCell21.StylePriority.UseBorders = false; this.xrTableCell21.StylePriority.UseTextAlignment = false; this.xrTableCell21.Text = "xrTableCell21"; this.xrTableCell21.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; - this.xrTableCell21.Weight = 0.1753024772125103D; + this.xrTableCell21.Weight = 0.13754578646370813D; // // xrTableCell23 // @@ -236,7 +238,7 @@ namespace CaritasGuenzburgNeuUlm this.xrTableCell23.StylePriority.UseTextAlignment = false; this.xrTableCell23.Text = "xrTableCell23"; this.xrTableCell23.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; - this.xrTableCell23.Weight = 0.17530210571377985D; + this.xrTableCell23.Weight = 0.16255453496028544D; // // xrTableCell24 // @@ -246,7 +248,7 @@ namespace CaritasGuenzburgNeuUlm this.xrTableCell24.StylePriority.UseTextAlignment = false; this.xrTableCell24.Text = "xrTableCell24"; this.xrTableCell24.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; - this.xrTableCell24.Weight = 0.17530225498759819D; + this.xrTableCell24.Weight = 0.16255453636511635D; // // xrTableCell56 // @@ -258,7 +260,7 @@ namespace CaritasGuenzburgNeuUlm this.xrTableCell56.StylePriority.UseFont = false; this.xrTableCell56.StylePriority.UseTextAlignment = false; this.xrTableCell56.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; - this.xrTableCell56.Weight = 0.1690677292306394D; + this.xrTableCell56.Weight = 0.16255391907779437D; // // xrTableCell30 // @@ -268,7 +270,7 @@ namespace CaritasGuenzburgNeuUlm this.xrTableCell30.StylePriority.UseTextAlignment = false; this.xrTableCell30.Text = "xrTableCell30"; this.xrTableCell30.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; - this.xrTableCell30.Weight = 0.17530254653572183D; + this.xrTableCell30.Weight = 0.16255453217526525D; // // xrTableCell31 // @@ -280,7 +282,7 @@ namespace CaritasGuenzburgNeuUlm this.xrTableCell31.StylePriority.UseTextAlignment = false; this.xrTableCell31.Text = "xrTableCell31"; this.xrTableCell31.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; - this.xrTableCell31.Weight = 0.17530248006328572D; + this.xrTableCell31.Weight = 0.16255414134505036D; // // ruleNotApprovedAndExpiringNext4Months // @@ -296,10 +298,6 @@ namespace CaritasGuenzburgNeuUlm this.ruleNotApprovedAndExpiringNext8Months.Formatting.BackColor = System.Drawing.Color.LightBlue; this.ruleNotApprovedAndExpiringNext8Months.Name = "ruleNotApprovedAndExpiringNext8Months"; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.SupportConceptListRO); - // // PageHeader // this.PageHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { @@ -319,7 +317,7 @@ namespace CaritasGuenzburgNeuUlm this.xrTable1.Name = "xrTable1"; this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow1}); - this.xrTable1.SizeF = new System.Drawing.SizeF(730F, 42F); + this.xrTable1.SizeF = new System.Drawing.SizeF(753.6897F, 42F); this.xrTable1.StylePriority.UseBackColor = false; this.xrTable1.StylePriority.UseBorders = false; this.xrTable1.StylePriority.UseFont = false; @@ -361,51 +359,55 @@ namespace CaritasGuenzburgNeuUlm // this.xrTableCell35.Name = "xrTableCell35"; this.xrTableCell35.Text = "Kostenträger"; - this.xrTableCell35.Weight = 0.18680057043490053D; + this.xrTableCell35.Weight = 0.37776139042581613D; // // xrTableCell3 // this.xrTableCell3.Name = "xrTableCell3"; this.xrTableCell3.Text = "Start"; - this.xrTableCell3.Weight = 0.17411593944191309D; + this.xrTableCell3.Weight = 0.13661506591261258D; // // xrTableCell4 // this.xrTableCell4.Name = "xrTableCell4"; this.xrTableCell4.Text = "Ende"; - this.xrTableCell4.Weight = 0.17411594236800579D; + this.xrTableCell4.Weight = 0.13661506883870522D; // // xrTableCell6 // this.xrTableCell6.Name = "xrTableCell6"; this.xrTableCell6.Text = "geleistete FLS abrechenbar"; - this.xrTableCell6.Weight = 0.17411593977114D; + this.xrTableCell6.Weight = 0.16145416940915303D; // // xrTableCell7 // this.xrTableCell7.Multiline = true; this.xrTableCell7.Name = "xrTableCell7"; this.xrTableCell7.Text = "geleistete FLS\r\nQualifiziert"; - this.xrTableCell7.Weight = 0.17411593877186071D; + this.xrTableCell7.Weight = 0.1614541684098737D; // // xrTableCell10 // this.xrTableCell10.Name = "xrTableCell10"; this.xrTableCell10.Text = "davon in Unter-qualifizierung"; - this.xrTableCell10.Weight = 0.16792310129540655D; + this.xrTableCell10.Weight = 0.1614541742463966D; // // xrTableCell55 // this.xrTableCell55.Multiline = true; this.xrTableCell55.Name = "xrTableCell55"; - this.xrTableCell55.Text = "geleistete FLS\r\nUnterstützend"; - this.xrTableCell55.Weight = 0.17411596700122417D; + this.xrTableCell55.Text = "geleistete FLS Unter- stützend"; + this.xrTableCell55.Weight = 0.16145416821313949D; // // xrTableCell13 // + this.xrTableCell13.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell13.Multiline = true; this.xrTableCell13.Name = "xrTableCell13"; - this.xrTableCell13.Text = "davon in Über-qualifizierung"; - this.xrTableCell13.Weight = 0.17411596268393109D; + this.xrTableCell13.StylePriority.UseBorders = false; + this.xrTableCell13.Text = "davon in \r\nÜber-qualifizierung"; + this.xrTableCell13.Weight = 0.16145416389584641D; // // PageFooter // @@ -417,7 +419,7 @@ namespace CaritasGuenzburgNeuUlm // xrPageInfo2 // this.xrPageInfo2.Font = new DevExpress.Drawing.DXFont("Arial", 8F); - this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(598.0001F, 17.00001F); + this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(621.6897F, 17.00001F); this.xrPageInfo2.Name = "xrPageInfo2"; this.xrPageInfo2.SizeF = new System.Drawing.SizeF(131.9999F, 18F); this.xrPageInfo2.StylePriority.UseFont = false; @@ -437,7 +439,7 @@ namespace CaritasGuenzburgNeuUlm // // bottomMarginBand1 // - this.bottomMarginBand1.HeightF = 20F; + this.bottomMarginBand1.HeightF = 22.79161F; this.bottomMarginBand1.Name = "bottomMarginBand1"; // // GroupFooter1 @@ -458,7 +460,7 @@ namespace CaritasGuenzburgNeuUlm this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 0, 100F); this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow3}); - this.xrTable3.SizeF = new System.Drawing.SizeF(730F, 20F); + this.xrTable3.SizeF = new System.Drawing.SizeF(753.6896F, 20F); this.xrTable3.StylePriority.UseBackColor = false; this.xrTable3.StylePriority.UseBorders = false; this.xrTable3.StylePriority.UseFont = false; @@ -492,11 +494,12 @@ namespace CaritasGuenzburgNeuUlm // xrTableCell38 // this.xrTableCell38.Borders = DevExpress.XtraPrinting.BorderSide.None; - this.xrTableCell38.Font = new DevExpress.Drawing.DXFont("Arial", 7F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrTableCell38.Font = new DevExpress.Drawing.DXFont("Arial", 7F); + this.xrTableCell38.Multiline = true; this.xrTableCell38.Name = "xrTableCell38"; this.xrTableCell38.StylePriority.UseBorders = false; this.xrTableCell38.StylePriority.UseFont = false; - this.xrTableCell38.Weight = 0.21234897018698445D; + this.xrTableCell38.Weight = 0.42942671209710925D; this.xrTableCell38.WordWrap = false; // // xrTableCell39 @@ -504,7 +507,9 @@ namespace CaritasGuenzburgNeuUlm this.xrTableCell39.Borders = DevExpress.XtraPrinting.BorderSide.None; this.xrTableCell39.Name = "xrTableCell39"; this.xrTableCell39.StylePriority.UseBorders = false; - this.xrTableCell39.Weight = 0.19792900024703364D; + this.xrTableCell39.StylePriority.UseTextAlignment = false; + this.xrTableCell39.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; + this.xrTableCell39.Weight = 0.14941714582034765D; // // xrTableCell40 // @@ -513,7 +518,7 @@ namespace CaritasGuenzburgNeuUlm this.xrTableCell40.StylePriority.UseBorders = false; this.xrTableCell40.StylePriority.UseTextAlignment = false; this.xrTableCell40.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; - this.xrTableCell40.Weight = 0.19792960623726463D; + this.xrTableCell40.Weight = 0.16118204400760555D; // // xrTableCell43 // @@ -527,7 +532,7 @@ namespace CaritasGuenzburgNeuUlm this.xrTableCell43.Summary = xrSummary1; this.xrTableCell43.Text = "xrTableCell43"; this.xrTableCell43.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; - this.xrTableCell43.Weight = 0.19792867016523913D; + this.xrTableCell43.Weight = 0.18353592485283354D; // // xrTableCell44 // @@ -541,7 +546,7 @@ namespace CaritasGuenzburgNeuUlm this.xrTableCell44.Summary = xrSummary2; this.xrTableCell44.Text = "xrTableCell44"; this.xrTableCell44.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; - this.xrTableCell44.Weight = 0.19792918656160247D; + this.xrTableCell44.Weight = 0.18353575188682056D; // // xrTableCell45 // @@ -552,7 +557,7 @@ namespace CaritasGuenzburgNeuUlm xrSummary3.IgnoreNullValues = true; this.xrTableCell45.Summary = xrSummary3; this.xrTableCell45.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; - this.xrTableCell45.Weight = 0.19089007580252415D; + this.xrTableCell45.Weight = 0.18353582838370852D; // // xrTableCell46 // @@ -566,7 +571,7 @@ namespace CaritasGuenzburgNeuUlm xrSummary4.Running = DevExpress.XtraReports.UI.SummaryRunning.Report; this.xrTableCell46.Summary = xrSummary4; this.xrTableCell46.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; - this.xrTableCell46.Weight = 0.197929489212761D; + this.xrTableCell46.Weight = 0.18353603299539684D; // // xrTableCell47 // @@ -577,7 +582,11 @@ namespace CaritasGuenzburgNeuUlm this.xrTableCell47.StylePriority.UseFont = false; this.xrTableCell47.StylePriority.UseTextAlignment = false; this.xrTableCell47.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; - this.xrTableCell47.Weight = 0.19792927324546572D; + this.xrTableCell47.Weight = 0.18353523537862015D; + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.SupportConceptListRO); // // KorridorUebersicht // @@ -596,7 +605,7 @@ namespace CaritasGuenzburgNeuUlm this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] { this.ruleNotApprovedAndExpiringNext8Months, this.ruleNotApprovedAndExpiringNext4Months}); - this.Margins = new DevExpress.Drawing.DXMargins(30F, 67F, 50F, 20F); + this.Margins = new DevExpress.Drawing.DXMargins(30F, 41F, 50F, 22.79161F); this.PageHeight = 1169; this.PageWidth = 827; this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4; @@ -604,9 +613,9 @@ namespace CaritasGuenzburgNeuUlm xrWatermark1.Id = "Watermark1"; this.Watermarks.Add(xrWatermark1); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); } diff --git a/ReportImp/CaritasGuenzburgNeuUlm/KorridorUebersicht.cs b/ReportImp/CaritasGuenzburgNeuUlm/KorridorUebersicht.cs index d2ff5f7cc..0225a4e15 100644 --- a/ReportImp/CaritasGuenzburgNeuUlm/KorridorUebersicht.cs +++ b/ReportImp/CaritasGuenzburgNeuUlm/KorridorUebersicht.cs @@ -21,15 +21,23 @@ namespace CaritasGuenzburgNeuUlm InitializeComponent(); } - public void SetReportDataSource(SupportConceptListRO pRO) + internal static decimal ParsePercent(string s) + { + if (string.IsNullOrEmpty(s)) return 0m; + var clean = s.TrimEnd('%').Replace(",", "."); + return decimal.TryParse(clean, System.Globalization.NumberStyles.Number, + System.Globalization.CultureInfo.InvariantCulture, out var v) ? v : 0m; + } + + public void SetReportDataSource(SupportConceptListRO pRO, bool filterAbove20Percent = false) { string[] CatsQuali = { "Qualifiziert", "FLS Q1", "FLS Q2" }; - string[] CatsAss = { "Unterstützend", "FLS Q3", "FLS Q4" }; + string[] CatsAss = { "Unterstützend", "FLS Q3", "FLS Q4" }; Dictionary empQualiDict = new Dictionary(); foreach (var sc in pRO.SupportConceptDetailList) { - // die verlängern ihre HPs immer, daher muss das auf die aktuelle Bewilligung laufen + // die verlängern ihre HPs immer, daher muss das auf die aktuelle Bewilligung laufen var start = sc.StartDate; var end = sc.EndDate; var cb2sc = DAOFactory.GenericDAO.LoadByID(sc.CostBearer2SupportConceptOid); @@ -44,7 +52,7 @@ namespace CaritasGuenzburgNeuUlm sc.EndDate = end; } - // Zur Detailansicht werden alle Zeiterfassungseinträge im Zeitraum gezogen und dann auf Dopplungen aus Gruppenbuchungen gefiltert + // Zur Detailansicht werden alle Zeiterfassungseinträge im Zeitraum gezogen und dann auf Dopplungen aus Gruppenbuchungen gefiltert var servicerecords = DAOFactory.SearchDAO.FindServiceRecords(null, sc.CostBearer2SupportConceptOid, null, start, end); servicerecords = servicerecords.Where(e => e.GroupOid == null). Concat(servicerecords.Where(e => e.GroupOid != null).GroupBy(e => e.GroupOid).Select(g => g.First())).ToList(); @@ -108,6 +116,16 @@ namespace CaritasGuenzburgNeuUlm sc.Custom2 = String.Format("{0:0.0}%", (100 * quoteU)); } } + if (filterAbove20Percent) + { + var toRemove = pRO.SupportConceptDetailList + .Where(sc => ParsePercent(sc.Custom1) < 20m && ParsePercent(sc.Custom2) < 30m) + .ToList(); + if (pRO.SupportConceptDetailList is System.Collections.IList mutableList) + foreach (var item in toRemove) + mutableList.Remove(item); + } + this.bindingSource1.DataSource = pRO; } }