This commit is contained in:
Jonathan Jenne
2023-11-30 14:00:30 +01:00
parent 1b88a6cff7
commit c2de72be74
25 changed files with 875 additions and 148 deletions

View File

@@ -0,0 +1,16 @@
Imports System.IO
Imports DevExpress.XtraPrinting
Public Class ReportCreator
Public Shared Async Function CreateReport(pReportItems As List(Of ReportItem)) As Task(Of Byte())
Dim oSource As New ReportSource With {.Items = pReportItems}
Dim oReport As New rptEnvelopeHistory() With {.DataSource = oSource, .DataMember = "Items"}
Await oReport.CreateDocumentAsync()
Using oStream As New MemoryStream()
Await oReport.ExportToPdfAsync(oStream, New PdfExportOptions)
Return oStream.ToArray()
End Using
End Function
End Class