Add support for multiple functions per field, add ADDRESS function

This commit is contained in:
Jonathan Jenne
2023-06-26 11:27:51 +02:00
parent 7846e660b9
commit 68e4c59e63
9 changed files with 274 additions and 154 deletions

View File

@@ -112,18 +112,20 @@ Public Class ReportGenerator(Of TReport As IReport)
ToList()
For Each oRow As DocumentRow In oRowList
Dim oSQL = oSQLConfigItem.Function.Params
Dim oField = oRow.Fields.
Where(Function(field) field.Key = oSQLConfigItem.Name).
SingleOrDefault()
For Each oFunction In oSQLConfigItem.Functions
Dim oSQL = oFunction.Params
Dim oField = oRow.Fields.
Where(Function(field) field.Key = oSQLConfigItem.Name).
SingleOrDefault()
oSQL = Patterns.ReplaceForImportFinalSQL(pDocument, pReportFileName, oSQL)
oSQL = Patterns.ReplaceForImportFinalSQL(pDocument, pReportFileName, oSQL)
Dim oValue = Database.GetScalarValue(oSQL)
Dim oValue = Database.GetScalarValue(oSQL)
If oValue IsNot Nothing Then
oField.Value.SetExternalValue(oValue)
End If
If oValue IsNot Nothing Then
oField.Value.SetExternalValue(oValue)
End If
Next
Next
Next