Posted 27 September 2017, 9:11 pm EST
Hi,
I’m trying to migrate an application from using C1Report to C1FlexReport. One feature of C1Report frequently used by the application is the rendering of the report output as a Pdf to a memory stream (subsequently consumed through a service call to a mail server).
The C1FlexReport samples I’ve viewed to achieve a similar result render the file to disk with an export filter (RenderToFilter()). The application generates hundreds of reports in payment/statement runs and this would be inefficient resulting in high disk IO.
Redacted function code
[vb]Friend Function CreatePdfAttachment(attachmentName As String, report As C1Report) As MemoryStreamAttachment
Dim reportStream As MemoryStream = New MemoryStream()
report.RenderToStream(reportStream, FileFormatEnum.PDFEmbedFonts)
Return New MemoryStreamAttachment(reportStream, MediaTypeNames.Application.Pdf, attachmentName)
End Function[/vb]
Is it possible to achieve the same outcome with C1FlexReport without writing the output to disk?
Regards.