diff --git a/ReportImp/MuenchenerAidsHilfeEV/ServiceInvoiceReport.Designer.cs b/ReportImp/MuenchenerAidsHilfeEV/ServiceInvoiceReport.Designer.cs index efa65f60c..00472b6e2 100644 --- a/ReportImp/MuenchenerAidsHilfeEV/ServiceInvoiceReport.Designer.cs +++ b/ReportImp/MuenchenerAidsHilfeEV/ServiceInvoiceReport.Designer.cs @@ -95,7 +95,6 @@ namespace MuenchenerAidsHilfeEV this.xrTableCell47 = new DevExpress.XtraReports.UI.XRTableCell(); this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); this.ReportFooter2 = new DevExpress.XtraReports.UI.ReportFooterBand(); - this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel(); this.xrTable4 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow10 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); @@ -106,6 +105,8 @@ namespace MuenchenerAidsHilfeEV this.rowEndbetrag = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell18 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrRichText4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText3)).BeginInit(); @@ -226,6 +227,7 @@ namespace MuenchenerAidsHilfeEV // Page1 // this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel1, this.xrTable5, this.lblEinrichtungsnummer, this.xrLabel7, @@ -347,7 +349,7 @@ namespace MuenchenerAidsHilfeEV this.lblEinrichtungsnummer.CanShrink = true; this.lblEinrichtungsnummer.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.lblEinrichtungsnummer.LocationFloat = new DevExpress.Utils.PointFloat(0F, 325F); + this.lblEinrichtungsnummer.LocationFloat = new DevExpress.Utils.PointFloat(0F, 337.5F); this.lblEinrichtungsnummer.Multiline = true; this.lblEinrichtungsnummer.Name = "lblEinrichtungsnummer"; this.lblEinrichtungsnummer.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -363,7 +365,7 @@ namespace MuenchenerAidsHilfeEV this.xrLabel7.CanShrink = true; this.xrLabel7.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(0F, 305F); + this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(0F, 317.5F); this.xrLabel7.Multiline = true; this.xrLabel7.Name = "xrLabel7"; this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -379,7 +381,7 @@ namespace MuenchenerAidsHilfeEV this.xrLabel2.CanShrink = true; this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Arial", 10F, 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, 245F); + this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 257.5F); this.xrLabel2.Multiline = true; this.xrLabel2.Name = "xrLabel2"; this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -549,7 +551,7 @@ namespace MuenchenerAidsHilfeEV this.xrLabel4.CanShrink = true; this.xrLabel4.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 285F); + this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 297.5F); this.xrLabel4.Multiline = true; this.xrLabel4.Name = "xrLabel4"; this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -566,7 +568,7 @@ namespace MuenchenerAidsHilfeEV this.xrLabel3.CanShrink = true; this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 265F); + this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 277.5F); this.xrLabel3.Name = "xrLabel3"; this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel3.SizeF = new System.Drawing.SizeF(650F, 20F); @@ -822,17 +824,6 @@ namespace MuenchenerAidsHilfeEV this.xrLabel15}); this.ReportFooter2.HeightF = 139.2501F; this.ReportFooter2.Name = "ReportFooter2"; - // - // xrLabel15 - // - this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0F, 79.75005F); - this.xrLabel15.Multiline = true; - this.xrLabel15.Name = "xrLabel15"; - this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel15.SizeF = new System.Drawing.SizeF(666.9999F, 59.50002F); - this.xrLabel15.StylePriority.UseFont = false; - this.xrLabel15.Text = "Zahlung sofort nach Rechnungserhalt ohne Abzug.\r\n\r\nDiese Rechnung wurde maschinel" + - "l erstellt und ist ohne Unterschrift gültig."; // // xrTable4 // @@ -964,6 +955,31 @@ namespace MuenchenerAidsHilfeEV this.xrTableCell19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrTableCell19.Weight = 0.63903258078000413D; // + // xrLabel15 + // + this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0F, 79.75005F); + this.xrLabel15.Multiline = true; + this.xrLabel15.Name = "xrLabel15"; + this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel15.SizeF = new System.Drawing.SizeF(666.9999F, 59.50002F); + this.xrLabel15.StylePriority.UseFont = false; + this.xrLabel15.Text = "Zahlung sofort nach Rechnungserhalt ohne Abzug.\r\n\r\nDiese Rechnung wurde maschinel" + + "l erstellt und ist ohne Unterschrift gültig."; + // + // xrLabel1 + // + this.xrLabel1.CanShrink = true; + this.xrLabel1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Notice")}); + this.xrLabel1.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Italic); + this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(333.1252F, 219.1667F); + 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(343.8748F, 38.33331F); + this.xrLabel1.StylePriority.UseFont = false; + this.xrLabel1.Text = "xrLabel1"; + // // bindingSource1 // this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO); @@ -991,6 +1007,7 @@ namespace MuenchenerAidsHilfeEV this.Version = "23.2"; xrWatermark1.Id = "Watermark1"; this.Watermarks.Add(xrWatermark1); + this.BeforePrint += new DevExpress.XtraReports.UI.BeforePrintEventHandler(this.ChangeName); ((System.ComponentModel.ISupportInitialize)(this.xrRichText4)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit(); @@ -1082,5 +1099,6 @@ namespace MuenchenerAidsHilfeEV private DevExpress.XtraReports.UI.XRTableRow rowEndbetrag; private DevExpress.XtraReports.UI.XRTableCell xrTableCell18; private DevExpress.XtraReports.UI.XRTableCell xrTableCell19; + private DevExpress.XtraReports.UI.XRLabel xrLabel1; } } diff --git a/ReportImp/MuenchenerAidsHilfeEV/ServiceInvoiceReport.cs b/ReportImp/MuenchenerAidsHilfeEV/ServiceInvoiceReport.cs index aefdb9ebb..631426d65 100644 --- a/ReportImp/MuenchenerAidsHilfeEV/ServiceInvoiceReport.cs +++ b/ReportImp/MuenchenerAidsHilfeEV/ServiceInvoiceReport.cs @@ -1,5 +1,6 @@ using System; using System.Text; +using System.Windows.Forms; using BeWo.Report; using BeWo.Report.ReportObjects; @@ -52,15 +53,15 @@ namespace MuenchenerAidsHilfeEV { lblAbrechnungszeitraum.Text = String.Format("hiermit berechnen wir für den Zeitraum {0:MMMM yyyy} - {1:MMMM yyyy} folgende erbrachte Leistungen:", start, end); } - String einrichtungsnummer = "102106"; + String einrichtungsnummer = "TWG102106"; foreach (var sip in pRO.ServiceInvoicePeriods) { foreach (var item in sip.ServiceInvoiceItems) { - if (item.ServiceDescription == "1:6" || item.ServiceDescription == "1:8" || item.ServiceDescription == "1:10") + if (item.ServiceDescription.Contains("1:6") || item.ServiceDescription.Contains("1:8") || item.ServiceDescription.Contains("1:10")) { - einrichtungsnummer = "102021"; + einrichtungsnummer = "BEW102021"; } } } @@ -81,5 +82,18 @@ namespace MuenchenerAidsHilfeEV this.bindingSource1.DataSource = pRO; } + + private void ChangeName(object sender, System.ComponentModel.CancelEventArgs e) + { + var report = sender as XtraReport; + var source = report.DataSource as BindingSource; + var ro = source.DataSource as ServiceInvoiceRO; + + var start = ro.AccountingPeriodStart; + var end = ro.AccountingPeriodEnd; + var klient = ro.CustomerFirstName + ro.CustomerLastName; + + this.DisplayName = String.Format("{0:dd.MM.yy}-{1:dd.MM.yy}_{2}", start, end, klient); + } } } \ No newline at end of file