When I try the following code to generate a PDF into a file directly from the report, I am unable to open the PDF, saying that the PDF cannot be opened because it does not have any pages.
Here's the code (VB.Net)
Code: Select all
Dim pdfSettings As New StiPdfExportSettings
Dim pdfExport As New StiPdfExportService
Dim strNewGUIId As String = System.Guid.NewGuid.ToString & ".pdf"
Dim strFileName As String = Server.MapPath("reports") & "\" & strNewGUIId
pdfExport.ExportPdf(rpt2, strFileName)
Any advice highly appreciated. Thank you.