Sub phaseItemSummaryGroupHeader_Format() Dim aggValue As Decimal = 0 Decimal.TryParse(ReportUtilities.ReturnTextBoxValue(rpt, "phaseItemSummaryGroupHeader", "txtAggLaborPrice"), aggValue) If showLaborHrsSummary Then Dim phaseName As String = ReportUtilities.ReturnTextboxValue(rpt, "phaseItemSummaryGroupHeader", "txtPhaseLabor") Dim laborTypes As List(Of LaborType) = Nothing If IsItOptionalSummary() Then laborTypes = ReportUtilities.GetLaborTypeSummaries(True, True) Else laborTypes = ReportUtilities.GetLaborTypeSummaries(True, False) End If Dim labHrs As Double = 0 If laborTypes IsNot Nothing Then labHrs = laborTypes.Where(Function(l) l.Name = phaseName).Sum(Function(l) l.AggregatedLaborHours) End If If (aggValue = 0 AndAlso labHrs = 0) Then ReportUtilities.SetSectionVisibility(rpt, "phaseItemSummaryGroupHeader", False) Else ReportUtilities.SetSectionVisibility(rpt, "phaseItemSummaryGroupHeader", True) End If Else ReportUtilities.SetSectionVisibility(rpt, "phaseItemSummaryGroupHeader", aggValue <> 0) End If If Not isShowAdjustment Then Dim adjustment As Double = CType(ReportUtilities.ReturnTextboxValue(rpt, "phaseItemSummaryGroupHeader", "txtLaborAdjustment"), Double) Dim laborPrice As Double = CType(ReportUtilities.ReturnTextboxValue(rpt, "phaseItemSummaryGroupHeader", "txtAggLaborPrice"), Double) If (adjustment <> 0) Then ReportUtilities.SetTextBoxValue(rpt, "phaseItemSummaryGroupHeader", "txtAggLaborPrice", (laborPrice + adjustment)) End If End If End Sub