From 4c64292e7aa29e4c2a685ae9a9433a3eff208906 Mon Sep 17 00:00:00 2001 From: HirschleM Date: Fri, 31 Oct 2025 14:40:41 +0100 Subject: [PATCH] MH: MalteserJohanniterJohanneshaus Belegungsquoten-Bericht Zwischenstand --- .../Belegungsquoten.Designer.cs | 450 ++++++++++++++++++ .../Belegungsquoten.cs | 29 ++ .../Belegungsquoten.resx | 120 +++++ .../CustomReportCreator.cs | 32 +- .../MalteserJohanniterJohanneshaus.csproj | 14 + ...aus.Reporting.BelegungsquotenRO.datasource | 10 + .../Reporting/BelegungsquotenRO.cs | 87 ++++ 7 files changed, 741 insertions(+), 1 deletion(-) create mode 100644 ReportImp/MalteserJohanniterJohanneshaus/Belegungsquoten.Designer.cs create mode 100644 ReportImp/MalteserJohanniterJohanneshaus/Belegungsquoten.cs create mode 100644 ReportImp/MalteserJohanniterJohanneshaus/Belegungsquoten.resx create mode 100644 ReportImp/MalteserJohanniterJohanneshaus/Properties/DataSources/MalteserJohanniterJohanneshaus.Reporting.BelegungsquotenRO.datasource create mode 100644 ReportImp/MalteserJohanniterJohanneshaus/Reporting/BelegungsquotenRO.cs diff --git a/ReportImp/MalteserJohanniterJohanneshaus/Belegungsquoten.Designer.cs b/ReportImp/MalteserJohanniterJohanneshaus/Belegungsquoten.Designer.cs new file mode 100644 index 000000000..d4de3bf5a --- /dev/null +++ b/ReportImp/MalteserJohanniterJohanneshaus/Belegungsquoten.Designer.cs @@ -0,0 +1,450 @@ +using BeWo.Report.ReportObjects; +namespace MalteserJohanniterJohanneshaus +{ + partial class Belegungsquoten + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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.Detail1 = new DevExpress.XtraReports.UI.DetailBand(); + this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand(); + this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); + this.pageFooterBand1 = new DevExpress.XtraReports.UI.PageFooterBand(); + this.xrPageInfo2 = new DevExpress.XtraReports.UI.XRPageInfo(); + this.xrPageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo(); + this.Title = new DevExpress.XtraReports.UI.XRControlStyle(); + this.FieldCaption = new DevExpress.XtraReports.UI.XRControlStyle(); + this.PageInfo = new DevExpress.XtraReports.UI.XRControlStyle(); + this.DataField = new DevExpress.XtraReports.UI.XRControlStyle(); + this.fieldFLS = new DevExpress.XtraReports.UI.CalculatedField(); + this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); + this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); + this.xrTable1 = new DevExpress.XtraReports.UI.XRTable(); + this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTable2 = new DevExpress.XtraReports.UI.XRTable(); + this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); + // + // Detail + // + this.Detail.HeightF = 0F; + this.Detail.Name = "Detail"; + this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); + this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + // + // Detail1 + // + this.Detail1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrTable2}); + this.Detail1.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { + new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); + this.Detail1.HeightF = 25F; + this.Detail1.Name = "Detail1"; + this.Detail1.StylePriority.UseFont = false; + // + // DetailReport + // + this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.Detail1}); + this.DetailReport.DataMember = "Wohnheimbelegungen"; + this.DetailReport.DataSource = this.bindingSource1; + this.DetailReport.Level = 0; + this.DetailReport.Name = "DetailReport"; + // + // ReportHeader + // + this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel2, + this.xrLabel1, + this.xrTable1}); + this.ReportHeader.Font = new DevExpress.Drawing.DXFont("Arial", 11F); + this.ReportHeader.HeightF = 98.54167F; + this.ReportHeader.Name = "ReportHeader"; + this.ReportHeader.StylePriority.UseFont = false; + // + // pageFooterBand1 + // + this.pageFooterBand1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrPageInfo2, + this.xrPageInfo1}); + this.pageFooterBand1.HeightF = 48F; + this.pageFooterBand1.Name = "pageFooterBand1"; + // + // xrPageInfo2 + // + this.xrPageInfo2.Font = new DevExpress.Drawing.DXFont("Arial", 8F); + this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(924.0834F, 25F); + this.xrPageInfo2.Name = "xrPageInfo2"; + this.xrPageInfo2.SizeF = new System.Drawing.SizeF(93.91663F, 23F); + this.xrPageInfo2.StyleName = "PageInfo"; + this.xrPageInfo2.StylePriority.UseFont = false; + this.xrPageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrPageInfo2.TextFormatString = "Seite {0} von {1}"; + // + // xrPageInfo1 + // + this.xrPageInfo1.Font = new DevExpress.Drawing.DXFont("Arial", 8F); + this.xrPageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 25F); + this.xrPageInfo1.Name = "xrPageInfo1"; + this.xrPageInfo1.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime; + this.xrPageInfo1.SizeF = new System.Drawing.SizeF(924.0834F, 23F); + this.xrPageInfo1.StyleName = "PageInfo"; + this.xrPageInfo1.StylePriority.UseFont = false; + // + // Title + // + this.Title.BackColor = System.Drawing.Color.White; + this.Title.BorderColor = System.Drawing.SystemColors.ControlText; + this.Title.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.Title.BorderWidth = 1F; + this.Title.Font = new DevExpress.Drawing.DXFont("Times New Roman", 24F); + this.Title.ForeColor = System.Drawing.Color.Black; + this.Title.Name = "Title"; + // + // FieldCaption + // + this.FieldCaption.BackColor = System.Drawing.Color.White; + this.FieldCaption.BorderColor = System.Drawing.SystemColors.ControlText; + this.FieldCaption.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.FieldCaption.BorderWidth = 1F; + this.FieldCaption.Font = new DevExpress.Drawing.DXFont("Times New Roman", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.FieldCaption.ForeColor = System.Drawing.Color.Black; + this.FieldCaption.Name = "FieldCaption"; + // + // PageInfo + // + this.PageInfo.BackColor = System.Drawing.Color.White; + this.PageInfo.BorderColor = System.Drawing.SystemColors.ControlText; + this.PageInfo.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.PageInfo.BorderWidth = 1F; + this.PageInfo.Font = new DevExpress.Drawing.DXFont("Times New Roman", 8F); + this.PageInfo.ForeColor = System.Drawing.Color.Black; + this.PageInfo.Name = "PageInfo"; + // + // DataField + // + this.DataField.BackColor = System.Drawing.Color.White; + this.DataField.BorderColor = System.Drawing.SystemColors.ControlText; + this.DataField.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.DataField.BorderWidth = 1F; + this.DataField.Font = new DevExpress.Drawing.DXFont("Times New Roman", 8F); + this.DataField.ForeColor = System.Drawing.SystemColors.ControlText; + this.DataField.Name = "DataField"; + // + // fieldFLS + // + this.fieldFLS.DataMember = "FLSReportGroups"; + this.fieldFLS.Expression = "[TotalFLM] / 60"; + this.fieldFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; + this.fieldFLS.Name = "fieldFLS"; + // + // topMarginBand1 + // + this.topMarginBand1.HeightF = 50F; + this.topMarginBand1.Name = "topMarginBand1"; + // + // bottomMarginBand1 + // + this.bottomMarginBand1.HeightF = 50F; + this.bottomMarginBand1.Name = "bottomMarginBand1"; + // + // xrTable1 + // + this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 73.54167F); + this.xrTable1.Name = "xrTable1"; + this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F); + this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.xrTableRow1}); + this.xrTable1.SizeF = new System.Drawing.SizeF(635.4167F, 25F); + // + // xrTableRow1 + // + this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell1, + this.xrTableCell2, + this.xrTableCell3, + this.xrTableCell4}); + this.xrTableRow1.Name = "xrTableRow1"; + this.xrTableRow1.Weight = 1D; + // + // xrTableCell1 + // + this.xrTableCell1.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell1.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrTableCell1.Multiline = true; + this.xrTableCell1.Name = "xrTableCell1"; + this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); + this.xrTableCell1.StylePriority.UseBorders = false; + this.xrTableCell1.StylePriority.UseFont = false; + this.xrTableCell1.StylePriority.UsePadding = false; + this.xrTableCell1.StylePriority.UseTextAlignment = false; + this.xrTableCell1.Text = "Wohnheim"; + this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell1.Weight = 1D; + // + // xrTableCell2 + // + this.xrTableCell2.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell2.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrTableCell2.Multiline = true; + this.xrTableCell2.Name = "xrTableCell2"; + this.xrTableCell2.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); + this.xrTableCell2.StylePriority.UseBorders = false; + this.xrTableCell2.StylePriority.UseFont = false; + this.xrTableCell2.StylePriority.UsePadding = false; + this.xrTableCell2.StylePriority.UseTextAlignment = false; + this.xrTableCell2.Text = "Kapazität"; + this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell2.Weight = 1D; + // + // xrTableCell3 + // + this.xrTableCell3.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell3.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrTableCell3.Multiline = true; + this.xrTableCell3.Name = "xrTableCell3"; + this.xrTableCell3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); + this.xrTableCell3.StylePriority.UseBorders = false; + this.xrTableCell3.StylePriority.UseFont = false; + this.xrTableCell3.StylePriority.UsePadding = false; + this.xrTableCell3.StylePriority.UseTextAlignment = false; + this.xrTableCell3.Text = "Belegung im Berichtszeitaum"; + this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell3.Weight = 2.1770834350585937D; + // + // xrTableCell4 + // + this.xrTableCell4.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell4.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrTableCell4.Multiline = true; + this.xrTableCell4.Name = "xrTableCell4"; + this.xrTableCell4.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); + this.xrTableCell4.StylePriority.UseBorders = false; + this.xrTableCell4.StylePriority.UseFont = false; + this.xrTableCell4.StylePriority.UsePadding = false; + this.xrTableCell4.StylePriority.UseTextAlignment = false; + this.xrTableCell4.Text = "Quote"; + this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell4.Weight = 2.1770834350585937D; + // + // xrTable2 + // + this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrTable2.Name = "xrTable2"; + this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F); + this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.xrTableRow2}); + this.xrTable2.SizeF = new System.Drawing.SizeF(635.4167F, 25F); + // + // xrTableRow2 + // + this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell5, + this.xrTableCell6, + this.xrTableCell7, + this.xrTableCell8}); + this.xrTableRow2.Name = "xrTableRow2"; + this.xrTableRow2.Weight = 1D; + // + // xrTableCell5 + // + this.xrTableCell5.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell5.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Wohnheimbelegungen.Name")}); + this.xrTableCell5.Font = new DevExpress.Drawing.DXFont("Arial", 10F); + this.xrTableCell5.Multiline = true; + this.xrTableCell5.Name = "xrTableCell5"; + this.xrTableCell5.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); + this.xrTableCell5.StylePriority.UseBorders = false; + this.xrTableCell5.StylePriority.UseFont = false; + this.xrTableCell5.StylePriority.UsePadding = false; + this.xrTableCell5.StylePriority.UseTextAlignment = false; + this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell5.Weight = 1D; + // + // xrTableCell6 + // + this.xrTableCell6.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Wohnheimbelegungen.MaximaleKapazitaet")}); + this.xrTableCell6.Font = new DevExpress.Drawing.DXFont("Arial", 10F); + this.xrTableCell6.Multiline = true; + this.xrTableCell6.Name = "xrTableCell6"; + this.xrTableCell6.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); + this.xrTableCell6.StylePriority.UseBorders = false; + this.xrTableCell6.StylePriority.UseFont = false; + this.xrTableCell6.StylePriority.UsePadding = false; + this.xrTableCell6.StylePriority.UseTextAlignment = false; + this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell6.Weight = 1D; + // + // xrTableCell7 + // + this.xrTableCell7.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Wohnheimbelegungen.Belegung")}); + this.xrTableCell7.Font = new DevExpress.Drawing.DXFont("Arial", 10F); + this.xrTableCell7.Multiline = true; + this.xrTableCell7.Name = "xrTableCell7"; + this.xrTableCell7.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); + this.xrTableCell7.StylePriority.UseBorders = false; + this.xrTableCell7.StylePriority.UseFont = false; + this.xrTableCell7.StylePriority.UsePadding = false; + this.xrTableCell7.StylePriority.UseTextAlignment = false; + this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell7.Weight = 2.1770834350585937D; + // + // xrTableCell8 + // + this.xrTableCell8.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Wohnheimbelegungen.Quote")}); + this.xrTableCell8.Font = new DevExpress.Drawing.DXFont("Arial", 10F); + this.xrTableCell8.Multiline = true; + this.xrTableCell8.Name = "xrTableCell8"; + this.xrTableCell8.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); + this.xrTableCell8.StylePriority.UseBorders = false; + this.xrTableCell8.StylePriority.UseFont = false; + this.xrTableCell8.StylePriority.UsePadding = false; + this.xrTableCell8.StylePriority.UseTextAlignment = false; + this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell8.TextFormatString = "{0:0.00%}"; + this.xrTableCell8.Weight = 2.1770834350585937D; + // + // xrLabel1 + // + this.xrLabel1.Font = new DevExpress.Drawing.DXFont("Arial", 12F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrLabel1.Multiline = true; + this.xrLabel1.Name = "xrLabel1"; + this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel1.SizeF = new System.Drawing.SizeF(635.4167F, 21.95835F); + this.xrLabel1.StylePriority.UseFont = false; + this.xrLabel1.Text = "Belegungsquoten aller Wohnheime"; + // + // xrLabel2 + // + this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Arial", 10F); + this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 21.95835F); + this.xrLabel2.Multiline = true; + this.xrLabel2.Name = "xrLabel2"; + this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel2.SizeF = new System.Drawing.SizeF(635.4167F, 21.95835F); + this.xrLabel2.StylePriority.UseFont = false; + this.xrLabel2.Text = "[Berichtsstart!dd.MM.yyyy] - [Berichtsende!dd.MM.yyyy]"; + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(MalteserJohanniterJohanneshaus.Reporting.BelegungsquotenRO); + // + // Belegungsquoten + // + this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.Detail, + this.DetailReport, + this.ReportHeader, + this.pageFooterBand1, + this.topMarginBand1, + this.bottomMarginBand1}); + this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] { + this.fieldFLS}); + this.DataSource = this.bindingSource1; + this.Landscape = true; + this.Margins = new DevExpress.Drawing.DXMargins(75F, 75F, 50F, 50F); + this.PageHeight = 827; + this.PageWidth = 1169; + this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4; + this.StyleSheet.AddRange(new DevExpress.XtraReports.UI.XRControlStyle[] { + this.Title, + this.FieldCaption, + this.PageInfo, + this.DataField}); + this.Version = "23.2"; + xrWatermark1.Id = "Watermark1"; + this.Watermarks.Add(xrWatermark1); + ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); + + } + + #endregion + + private DevExpress.XtraReports.UI.DetailBand Detail; + private System.Windows.Forms.BindingSource bindingSource1; + private DevExpress.XtraReports.UI.DetailBand Detail1; + private DevExpress.XtraReports.UI.DetailReportBand DetailReport; + private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader; + private DevExpress.XtraReports.UI.PageFooterBand pageFooterBand1; + private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo2; + private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo1; + private DevExpress.XtraReports.UI.XRControlStyle Title; + private DevExpress.XtraReports.UI.XRControlStyle FieldCaption; + private DevExpress.XtraReports.UI.XRControlStyle PageInfo; + private DevExpress.XtraReports.UI.XRControlStyle DataField; + private DevExpress.XtraReports.UI.CalculatedField fieldFLS; + private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1; + private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1; + private DevExpress.XtraReports.UI.XRTable xrTable1; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow1; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell1; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell2; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell3; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell4; + private DevExpress.XtraReports.UI.XRTable xrTable2; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow2; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell5; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell6; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell7; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell8; + private DevExpress.XtraReports.UI.XRLabel xrLabel1; + private DevExpress.XtraReports.UI.XRLabel xrLabel2; + } +} diff --git a/ReportImp/MalteserJohanniterJohanneshaus/Belegungsquoten.cs b/ReportImp/MalteserJohanniterJohanneshaus/Belegungsquoten.cs new file mode 100644 index 000000000..2bbd87fd3 --- /dev/null +++ b/ReportImp/MalteserJohanniterJohanneshaus/Belegungsquoten.cs @@ -0,0 +1,29 @@ +using System; +using BeWo.Report.ReportObjects; +using BeWo.Report; +using DevExpress.XtraReports.UI; +using System.Data; +using MalteserJohanniterJohanneshaus.Reporting; + +namespace MalteserJohanniterJohanneshaus +{ + public partial class Belegungsquoten : DevExpress.XtraReports.UI.XtraReport, IBeWoReport + { + public Belegungsquoten() + { + InitializeComponent(); + + } + + public void SetReportDataSource(QueryRO pRO) + { + DateTime start = DateTime.Parse(pRO.Rows[0].Field1.ToString()); + DateTime ende = DateTime.Parse(pRO.Rows[0].Field2.ToString()); + + var ro = BelegungsquotenRO.Create(start, ende); + + this.bindingSource1.DataSource = ro; + } + + } +} diff --git a/ReportImp/MalteserJohanniterJohanneshaus/Belegungsquoten.resx b/ReportImp/MalteserJohanniterJohanneshaus/Belegungsquoten.resx new file mode 100644 index 000000000..d58980a38 --- /dev/null +++ b/ReportImp/MalteserJohanniterJohanneshaus/Belegungsquoten.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ReportImp/MalteserJohanniterJohanneshaus/CustomReportCreator.cs b/ReportImp/MalteserJohanniterJohanneshaus/CustomReportCreator.cs index d4ee84f90..7c3ab5258 100644 --- a/ReportImp/MalteserJohanniterJohanneshaus/CustomReportCreator.cs +++ b/ReportImp/MalteserJohanniterJohanneshaus/CustomReportCreator.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Text; using BeWo.Data; @@ -10,11 +11,13 @@ using BeWo.Report.ReportObjects; using BeWo.Service.DCEntityMapper; using BeWo.Service.Plugins; using BS.Shared; +using BS.Shared.Core; using BS.Shared.DataContracts; using BS.Shared.DataContracts.Compact; using BS.Shared.Extensions; using DevExpress.XtraReports.Design; using DevExpress.XtraReports.UI; +using MalteserJohanniterJohanneshaus.Reporting; namespace MalteserJohanniterJohanneshaus { @@ -200,7 +203,34 @@ namespace MalteserJohanniterJohanneshaus report.SetReportDataSource(ro); return report as XtraReport; - } + } + //public override XtraReport CreateQueryReport(long queryOid, String queryReportId) + //{ + // var query = DAOFactory.GenericDAO.LoadByID(queryOid); + // if (query is null) + // { + // return new XtraReport(); + // } + + // var path = Utils.CreateSavePath(TempPath, queryReportId + ".xml"); + // var table = Utils.XMLDeserialize(path); + // var qro = QueryRO.Create(query, table); + + + + // if (qro.Rows.Count > 0) + // { + // Belegungsquoten report = new Belegungsquoten(); + // report.SetReportDataSource(qro); + + // if (report != null) + // { + // return report; + // } + // } + + // return FindReportImp(null, query.ReportTypeName) as XtraReport; + //} } } diff --git a/ReportImp/MalteserJohanniterJohanneshaus/MalteserJohanniterJohanneshaus.csproj b/ReportImp/MalteserJohanniterJohanneshaus/MalteserJohanniterJohanneshaus.csproj index 56934256d..6439ebf94 100644 --- a/ReportImp/MalteserJohanniterJohanneshaus/MalteserJohanniterJohanneshaus.csproj +++ b/ReportImp/MalteserJohanniterJohanneshaus/MalteserJohanniterJohanneshaus.csproj @@ -116,6 +116,12 @@ True Resources.resx + + Component + + + Belegungsquoten.cs + Component @@ -128,6 +134,7 @@ RechnungBesWohnformen.cs + Component @@ -218,6 +225,10 @@ ResXFileCodeGenerator Resources.Designer.cs + + Belegungsquoten.cs + Designer + Quittierungsbeleg.cs Designer @@ -250,5 +261,8 @@ Designer + + + \ No newline at end of file diff --git a/ReportImp/MalteserJohanniterJohanneshaus/Properties/DataSources/MalteserJohanniterJohanneshaus.Reporting.BelegungsquotenRO.datasource b/ReportImp/MalteserJohanniterJohanneshaus/Properties/DataSources/MalteserJohanniterJohanneshaus.Reporting.BelegungsquotenRO.datasource new file mode 100644 index 000000000..61613d395 --- /dev/null +++ b/ReportImp/MalteserJohanniterJohanneshaus/Properties/DataSources/MalteserJohanniterJohanneshaus.Reporting.BelegungsquotenRO.datasource @@ -0,0 +1,10 @@ + + + + MalteserJohanniterJohanneshaus.Reporting.BelegungsquotenRO, 1422963536_Reports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/ReportImp/MalteserJohanniterJohanneshaus/Reporting/BelegungsquotenRO.cs b/ReportImp/MalteserJohanniterJohanneshaus/Reporting/BelegungsquotenRO.cs new file mode 100644 index 000000000..e1ec03308 --- /dev/null +++ b/ReportImp/MalteserJohanniterJohanneshaus/Reporting/BelegungsquotenRO.cs @@ -0,0 +1,87 @@ +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Service.DCEntityMapper; +using BS.Shared.DataContracts; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MalteserJohanniterJohanneshaus.Reporting +{ + public class BelegungsquotenRO + { + public DateTime Berichtsstart { get; set; } + public DateTime Berichtsende { get; set; } + public List Wohnheimbelegungen { get; set; } + + + public static BelegungsquotenRO Create(DateTime start, DateTime ende) + { + BelegungsquotenRO ro = new BelegungsquotenRO(); + + ro.Berichtsstart = start; + ro.Berichtsende = ende; + ro.Wohnheimbelegungen = new List(); + + // Alle aktiven Hilfepläne und alle Wohnheime holen + var aktiveHilfeplaene = MapperFactory.SupportConceptDC_SupportConcept.MapToNewDCs(DAOFactory.GenericDAO.GetAllActive()); + var wohnheime = MapperFactory.WohnheimDC_Wohnheim.MapToNewDCs(DAOFactory.GenericDAO.GetAllActive()); + List erfassteKlientenOids = new List(); + + // FĂĽr jedes Wohnheim eine Wohnheimnbelegeung erzeugen und Kapazizät zuordnen (varfield). + // Dann alle Hilfepläne durchgehen und schauen, was im Feld "Kostenstelle" eingetragen wurde (selbe Bezeichnungen wie Wohnheimnamen) + // Dann fĂĽr jeden Berichtstag durchgehen, welche Hilfepläne eine Bewilligung fĂĽr jedes Wohnheim haben und so die Belegung erfassen + // Manche Klienten haben mehrere Hilfepläne, jeder darf aber nur ein mal gezählt werden, doppelte also ĂĽberspringen! + // Dann ins Verhältnis setzen: Belegung gesamt zu Maximalkapazität (also Berichtstage * Kapazität) + foreach (var wohnheim in wohnheime) + { + Wohnheimbelegung wb = new Wohnheimbelegung(); + wb.Name = wohnheim.WohnheimName; + wb.Belegung = 0; + + // Kapatzität setzen + if (wohnheim.VarFields != null && wohnheim.VarFields.Count > 0) + { + int kapazitaet = 0; + + var kapazitaetVF = wohnheim.VarFields.FirstOrDefault(v => v.VarFieldDefOid == 205); // OID 205 = Kapazität; + if (kapazitaetVF != null) + kapazitaet = Convert.ToInt32(kapazitaetVF.VarFieldValue); + else + kapazitaet = 0; + + int berichtstage = (ende - start).Days; + + wb.MaximaleKapazitaet = berichtstage * kapazitaet; + } + + // Belegung fĂĽr Wohnheim ermitteln (hp.CostBearerRelations.Notice hat die Kostenstelle bzw. das Wohnheim) + var hilfeplaeneFuerWohnheim = aktiveHilfeplaene.Where(sc => sc.CostBearerRelations.Any(cbr => cbr.Notice != null && cbr.Notice.Trim().Contains(wb.Name.Trim()))).ToList(); + + foreach (var sc in hilfeplaeneFuerWohnheim) + { + + } + + + wb.Quote = wb.Belegung / wb.MaximaleKapazitaet * 100; + + ro.Wohnheimbelegungen.Add(wb); + + + } + + return ro; + } + + public class Wohnheimbelegung + { + public string Name { get; set; } + public int MaximaleKapazitaet { get; set; } + public int Belegung { get; set; } + public decimal Quote { get; set; } + } + } +}