Show Template name in Report
This commit is contained in:
parent
18cc418fba
commit
80e40fbc23
@ -10,7 +10,6 @@ Imports MultiTool.Shared.Templates
|
|||||||
Public Class ReportGenerator(Of TReport As IReport)
|
Public Class ReportGenerator(Of TReport As IReport)
|
||||||
Inherits BaseClass
|
Inherits BaseClass
|
||||||
|
|
||||||
Private ReadOnly Database As MSSQLServer
|
|
||||||
Private ReadOnly TemplateConfig As TemplateConfig
|
Private ReadOnly TemplateConfig As TemplateConfig
|
||||||
Private ReadOnly GeneralConfig As GeneralConfig
|
Private ReadOnly GeneralConfig As GeneralConfig
|
||||||
Private ReadOnly Patterns As Patterns
|
Private ReadOnly Patterns As Patterns
|
||||||
@ -32,7 +31,7 @@ Public Class ReportGenerator(Of TReport As IReport)
|
|||||||
Return oFilePath
|
Return oFilePath
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GenerateReport(pDocument As Document) As TReport
|
Public Function GenerateReport(pDocument As Document, pTemplate As Template) As TReport
|
||||||
|
|
||||||
Dim oMapperConfig As New Mapper(LogConfig)
|
Dim oMapperConfig As New Mapper(LogConfig)
|
||||||
Dim oHeadMapper = oMapperConfig.GetMapper(Of ReportHead)(New Dictionary(Of String, String) From {
|
Dim oHeadMapper = oMapperConfig.GetMapper(Of ReportHead)(New Dictionary(Of String, String) From {
|
||||||
@ -57,7 +56,7 @@ Public Class ReportGenerator(Of TReport As IReport)
|
|||||||
})
|
})
|
||||||
|
|
||||||
Dim oSQLConfig = TemplateConfig.Items.
|
Dim oSQLConfig = TemplateConfig.Items.
|
||||||
Where(Function(item) item.Function.Name = "SQL").
|
Where(Function(item) item.Function.Name = Constants.FUNCTION_SQL).
|
||||||
ToList()
|
ToList()
|
||||||
|
|
||||||
FillFieldValuesFromSQL(pDocument, oSQLConfig)
|
FillFieldValuesFromSQL(pDocument, oSQLConfig)
|
||||||
@ -71,7 +70,7 @@ Public Class ReportGenerator(Of TReport As IReport)
|
|||||||
ToList()
|
ToList()
|
||||||
|
|
||||||
Dim oReportHead = oHeadMapper.Map(Of Dictionary(Of String, FieldValue), ReportHead)(oHeadRow)
|
Dim oReportHead = oHeadMapper.Map(Of Dictionary(Of String, FieldValue), ReportHead)(oHeadRow)
|
||||||
oReportHead.Title = "EDI Bestellung (orders)"
|
oReportHead.Title = pTemplate.Name
|
||||||
oReportHead.Subtitle = "Schaum"
|
oReportHead.Subtitle = "Schaum"
|
||||||
oReportHead.Filename = pDocument.FileName
|
oReportHead.Filename = pDocument.FileName
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user