GrundsteinEV: QB Fix für Leerreports

This commit is contained in:
2023-05-26 15:13:34 +02:00
parent a62780cc24
commit ce5d91da0b
4 changed files with 40 additions and 15 deletions

View File

@@ -50,7 +50,6 @@ namespace GrundsteinEV
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell28 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.xrLabel29 = new DevExpress.XtraReports.UI.XRLabel();
@@ -80,6 +79,8 @@ namespace GrundsteinEV
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.totalFLMFKString = new DevExpress.XtraReports.UI.CalculatedField();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -356,10 +357,6 @@ namespace GrundsteinEV
this.xrTableCell28.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell28.Weight = 1.1789457176312843D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// formattingRuleStartDate
//
this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]";
@@ -670,7 +667,7 @@ namespace GrundsteinEV
this.xrLabel4.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel4.BorderWidth = 2F;
this.xrLabel4.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TotalFLMFehlkontakte")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TotalFLMUnqualifiedString")});
this.xrLabel4.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(371.2639F, 0F);
this.xrLabel4.Name = "xrLabel4";
@@ -792,6 +789,15 @@ namespace GrundsteinEV
this.fieldKontaktArt.FieldType = DevExpress.XtraReports.UI.FieldType.String;
this.fieldKontaktArt.Name = "fieldKontaktArt";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// totalFLMFKString
//
this.totalFLMFKString.FieldType = DevExpress.XtraReports.UI.FieldType.String;
this.totalFLMFKString.Name = "totalFLMFKString";
//
// Quittierungsbeleg
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -802,7 +808,8 @@ namespace GrundsteinEV
this.bottomMarginBand1,
this.GroupFooter1});
this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] {
this.fieldKontaktArt});
this.fieldKontaktArt,
this.totalFLMFKString});
this.DataSource = this.bindingSource1;
this.Font = new System.Drawing.Font("Arial", 10F);
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
@@ -874,5 +881,6 @@ namespace GrundsteinEV
private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
private DevExpress.XtraReports.UI.XRLabel xrLabel4;
private DevExpress.XtraReports.UI.CalculatedField totalFLMFKString;
}
}

View File

@@ -29,7 +29,7 @@ namespace GrundsteinEV
foreach (var sd in pRO.Services)
{
if (sd.IsBillable || sd.ServiceDescription.ToLower().Contains("fehlkontakt"))
if (sd.IsBillable || (sd.ServiceDescription != null && sd.ServiceDescription.ToLower().Contains("fehlkontakt")))
{
if (sd.IsGroup)
{
@@ -57,6 +57,7 @@ namespace GrundsteinEV
{
sd.StartDateString = "";
sd.FLSQualifiedString = "";
sd.FLSUnqualifiedString = "";
servicesBillable.Add(sd);
}
}
@@ -66,6 +67,14 @@ namespace GrundsteinEV
else
pRO.TotalFLMQualifiedString = "";
if (pRO.TotalFLMFehlkontakte != 0)
pRO.TotalFLMUnqualifiedString = String.Format("{0:0.##}", pRO.TotalFLMFehlkontakte);
else
pRO.TotalFLMUnqualifiedString = "0";
if (pRO.TotalFLMFehlkontakte == 0 && pRO.TotalFLMQualified == 0)
pRO.TotalFLMUnqualifiedString = "";
pRO.Services = servicesBillable;
}

View File

@@ -53,7 +53,6 @@ namespace GrundsteinEV
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell28 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.xrLabel29 = new DevExpress.XtraReports.UI.XRLabel();
@@ -81,6 +80,7 @@ namespace GrundsteinEV
this.lblSumme = new DevExpress.XtraReports.UI.XRLabel();
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
this.MinutesNullable = new DevExpress.XtraReports.UI.CalculatedField();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -395,10 +395,6 @@ namespace GrundsteinEV
this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell1.Weight = 0.32440575926098558D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// formattingRuleStartDate
//
this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]";
@@ -706,7 +702,7 @@ namespace GrundsteinEV
this.xrLabel1.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel1.BorderWidth = 2F;
this.xrLabel1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TotalFLMFehlkontakte")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TotalFLMUnqualifiedString")});
this.xrLabel1.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(360.8472F, 0F);
this.xrLabel1.Name = "xrLabel1";
@@ -803,6 +799,10 @@ namespace GrundsteinEV
this.MinutesNullable.Expression = "Iif(IsNullOrEmpty([Minutes]),9,[Minutes])";
this.MinutesNullable.Name = "MinutesNullable";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// QuittierungsbelegMitHandzeichen
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {

View File

@@ -28,7 +28,7 @@ namespace GrundsteinEV
foreach (var sd in pRO.Services)
{
if (sd.IsBillable || sd.ServiceDescription.ToLower().Contains("fehlkontakt"))
if (sd.IsBillable || (sd.ServiceDescription != null && sd.ServiceDescription.ToLower().Contains("fehlkontakt")))
{
ServicesOverviewRO.CreateSignatureString(sd);
if (sd.IsGroup)
@@ -67,6 +67,14 @@ namespace GrundsteinEV
else
pRO.TotalFLMQualifiedString = "";
if (pRO.TotalFLMFehlkontakte != 0)
pRO.TotalFLMUnqualifiedString = String.Format("{0:0.##}", pRO.TotalFLMFehlkontakte);
else
pRO.TotalFLMUnqualifiedString = "0";
if (pRO.TotalFLMFehlkontakte == 0 && pRO.TotalFLMQualified == 0)
pRO.TotalFLMUnqualifiedString = "";
pRO.Services = servicesBillable;
}