diff --git a/ReportImp/DiakonieKKKleve/ServicesOverviewReport.Designer.cs b/ReportImp/DiakonieKKKleve/ServicesOverviewReport.Designer.cs index 2f557b381..2569f5ee4 100644 --- a/ReportImp/DiakonieKKKleve/ServicesOverviewReport.Designer.cs +++ b/ReportImp/DiakonieKKKleve/ServicesOverviewReport.Designer.cs @@ -51,12 +51,13 @@ namespace BeWo.DiakonieKKKleve this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); this.formattingRuleRowInvisible = new DevExpress.XtraReports.UI.FormattingRule(); this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox(); + this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); this.xrLabel16 = new DevExpress.XtraReports.UI.XRLabel(); this.lblSummeMinutenFK = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); this.lblSummeMinuten = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); @@ -66,6 +67,7 @@ namespace BeWo.DiakonieKKKleve this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); this.xrLabel20 = new DevExpress.XtraReports.UI.XRLabel(); @@ -97,9 +99,7 @@ namespace BeWo.DiakonieKKKleve this.GroupFooter4 = new DevExpress.XtraReports.UI.GroupFooterBand(); this.xrSubreport3 = new DevExpress.XtraReports.UI.XRSubreport(); this.fieldGruppe = new DevExpress.XtraReports.UI.CalculatedField(); - this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); - this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); @@ -317,6 +317,7 @@ namespace BeWo.DiakonieKKKleve // GroupFooter1 // this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel5, this.xrPictureBox2, this.xrPictureBox1, this.xrLabel16, @@ -324,7 +325,6 @@ namespace BeWo.DiakonieKKKleve this.xrLabel17, this.xrLabel3, this.lblSummeMinuten, - this.xrLabel5, this.xrLabel6, this.xrLabel7, this.xrLabel8, @@ -334,15 +334,34 @@ namespace BeWo.DiakonieKKKleve this.GroupFooter1.Name = "GroupFooter1"; this.GroupFooter1.StylePriority.UseFont = false; // + // xrPictureBox2 + // + this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "CustomerSignature")}); + this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(491.8751F, 163.2918F); + this.xrPictureBox2.Name = "xrPictureBox2"; + this.xrPictureBox2.SizeF = new System.Drawing.SizeF(195.1249F, 35.49995F); + this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; + // + // xrPictureBox1 + // + this.xrPictureBox1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "EmployeeSignature")}); + this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(104.4999F, 163.2918F); + this.xrPictureBox1.Name = "xrPictureBox1"; + this.xrPictureBox1.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint"; + this.xrPictureBox1.SizeF = new System.Drawing.SizeF(203.1663F, 35.50002F); + this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; + // // xrLabel16 // this.xrLabel16.BackColor = System.Drawing.Color.Transparent; this.xrLabel16.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeSignatureDate", "{0:dd.MM.yyyy}")}); - this.xrLabel16.LocationFloat = new DevExpress.Utils.PointFloat(0F, 163.2918F); + this.xrLabel16.LocationFloat = new DevExpress.Utils.PointFloat(0F, 173.7085F); this.xrLabel16.Name = "xrLabel16"; this.xrLabel16.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel16.SizeF = new System.Drawing.SizeF(117F, 35.50002F); + this.xrLabel16.SizeF = new System.Drawing.SizeF(104.4999F, 25.08336F); this.xrLabel16.StylePriority.UseBackColor = false; this.xrLabel16.StylePriority.UseTextAlignment = false; this.xrLabel16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter; @@ -407,38 +426,27 @@ namespace BeWo.DiakonieKKKleve this.lblSummeMinuten.StylePriority.UseTextAlignment = false; this.lblSummeMinuten.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // - // xrLabel5 - // - this.xrLabel5.Borders = DevExpress.XtraPrinting.BorderSide.Top; - this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 198.7918F); - this.xrLabel5.Name = "xrLabel5"; - this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel5.SizeF = new System.Drawing.SizeF(117F, 17.99997F); - this.xrLabel5.StylePriority.UseBorders = false; - this.xrLabel5.StylePriority.UseFont = false; - this.xrLabel5.Text = "Datum"; - // // xrLabel6 // this.xrLabel6.Borders = DevExpress.XtraPrinting.BorderSide.Top; - this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(150F, 198.7918F); + this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(0F, 198.7918F); this.xrLabel6.Name = "xrLabel6"; this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel6.SizeF = new System.Drawing.SizeF(259.7918F, 17.99998F); + this.xrLabel6.SizeF = new System.Drawing.SizeF(307.6663F, 17.99998F); this.xrLabel6.StylePriority.UseBorders = false; this.xrLabel6.StylePriority.UseFont = false; - this.xrLabel6.Text = "Unterschrift Mitarbeiter/in"; + this.xrLabel6.Text = "Datum, Unterschrift Mitarbeiter/in"; // // xrLabel7 // this.xrLabel7.Borders = DevExpress.XtraPrinting.BorderSide.Top; - this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(450F, 198.7918F); + this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(387.0832F, 198.7918F); this.xrLabel7.Name = "xrLabel7"; this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel7.SizeF = new System.Drawing.SizeF(210.0001F, 17.99997F); + this.xrLabel7.SizeF = new System.Drawing.SizeF(299.9168F, 17.99997F); this.xrLabel7.StylePriority.UseBorders = false; this.xrLabel7.StylePriority.UseFont = false; - this.xrLabel7.Text = "Unterschrift Klient/in"; + this.xrLabel7.Text = "Datum, Unterschrift Klient/in"; // // xrLabel8 // @@ -553,6 +561,10 @@ namespace BeWo.DiakonieKKKleve this.xrLabel9.Text = "Gruppe"; this.xrLabel9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); + // // formattingRuleStartDate // this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]"; @@ -837,30 +849,18 @@ namespace BeWo.DiakonieKKKleve this.fieldGruppe.FieldType = DevExpress.XtraReports.UI.FieldType.String; this.fieldGruppe.Name = "fieldGruppe"; // - // xrPictureBox1 + // xrLabel5 // - this.xrPictureBox1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "EmployeeSignature")}); - this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(150F, 163.2918F); - this.xrPictureBox1.Name = "xrPictureBox1"; - this.xrPictureBox1.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint"; - this.xrPictureBox1.SizeF = new System.Drawing.SizeF(211.4997F, 35.50002F); - this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; - this.xrPictureBox1.BeforePrint += new DevExpress.XtraReports.UI.BeforePrintEventHandler(this.picSignature_BeforePrint); - // - // xrPictureBox2 - // - this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "CustomerSignature")}); - this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(450F, 163.2918F); - this.xrPictureBox2.Name = "xrPictureBox2"; - this.xrPictureBox2.SizeF = new System.Drawing.SizeF(199.3611F, 35.50002F); - this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; - this.xrPictureBox2.BeforePrint += new DevExpress.XtraReports.UI.BeforePrintEventHandler(this.picSignature_BeforePrint); - // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); + this.xrLabel5.BackColor = System.Drawing.Color.Transparent; + this.xrLabel5.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")}); + this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(387.0832F, 173.7085F); + this.xrLabel5.Name = "xrLabel5"; + this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel5.SizeF = new System.Drawing.SizeF(104.4999F, 25.08336F); + this.xrLabel5.StylePriority.UseBackColor = false; + this.xrLabel5.StylePriority.UseTextAlignment = false; + this.xrLabel5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter; // // Stundenzettel // @@ -935,7 +935,6 @@ namespace BeWo.DiakonieKKKleve private DevExpress.XtraReports.UI.XRLabel lblSummeMinuten; private DevExpress.XtraReports.UI.XRLabel xrLabel3; private DevExpress.XtraReports.UI.XRLabel xrLabel6; - private DevExpress.XtraReports.UI.XRLabel xrLabel5; private DevExpress.XtraReports.UI.XRLabel xrLabel7; private DevExpress.XtraReports.UI.XRLabel xrLabel8; private DevExpress.XtraReports.UI.XRLabel lblSummeMinutenFaktor; @@ -972,5 +971,6 @@ namespace BeWo.DiakonieKKKleve private DevExpress.XtraReports.UI.XRLabel xrLabel16; private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1; private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2; + private DevExpress.XtraReports.UI.XRLabel xrLabel5; } } diff --git a/ReportImp/DiakonieKKKleve/ServicesOverviewReport.cs b/ReportImp/DiakonieKKKleve/ServicesOverviewReport.cs index 5d3a08640..3ac4ce761 100644 --- a/ReportImp/DiakonieKKKleve/ServicesOverviewReport.cs +++ b/ReportImp/DiakonieKKKleve/ServicesOverviewReport.cs @@ -147,24 +147,10 @@ namespace BeWo.DiakonieKKKleve } private void picSignature_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e) { - return; - XRPictureBox xrBox = sender as XRPictureBox; - //var test = this.GetCurrent - string base64String = xrBox.Tag as string; - if (!String.IsNullOrWhiteSpace(base64String)) - { - var base64Data = Regex.Match(base64String, @"data:image/(?.+?),(?.+)").Groups["data"].Value; - var binData = Convert.FromBase64String(base64Data); - System.Drawing.Image img = ByteArrayToImage(binData); - xrBox.Image = BS.Shared.Core.Utils.CropImage(img); - } - else - { - xrBox.Image = null; - } - } - public System.Drawing.Image ByteArrayToImage(byte[] byteArrayIn) + } + + public System.Drawing.Image ByteArrayToImage(byte[] byteArrayIn) { using (var memoryStream = new MemoryStream(byteArrayIn)) {