diff --git a/app/DD_PM_WINDREAM/clsPatterns.vb b/app/DD_PM_WINDREAM/clsPatterns.vb index b09ed6f..f309fae 100644 --- a/app/DD_PM_WINDREAM/clsPatterns.vb +++ b/app/DD_PM_WINDREAM/clsPatterns.vb @@ -197,6 +197,8 @@ Public Class clsPatterns oColumnName = oSplitName.Last() End If + LOGGER.Debug("Found placeholder for control [{0}].", oControlName) + Dim oControl As Control = oPanel.Controls.Find(oControlName, False).FirstOrDefault() If oControl IsNot Nothing Then @@ -233,13 +235,13 @@ Public Class clsPatterns Where(Function(c) c.FieldName = oColumnName). SingleOrDefault() - If oColumn Is Nothing Then + If oColumn?.SummaryItem?.SummaryValue Is Nothing Then LOGGER.Warn("Column [{0}] not found in Grid!", oColumnName) oReplaceValue = ERROR_REPLACE_VALUE + Else + oReplaceValue = oColumn.SummaryItem.SummaryValue End If - oReplaceValue = oColumn.SummaryItem.SummaryValue - Case Else oReplaceValue = ERROR_REPLACE_VALUE End Select