Hi,
We are using telerik report version 'Telerik_Reporting_Q2_2010_v4_1_10_714_dev.msi'.
Previously, we have problem of having first page blank in the report viewer. So, to correct this problem, we added following code in the vb file and its working properly.
Public Sub New()
InitializeComponent()
detail.Height = Unit.Pixel(10)
End Sub
But while exporting same report to PDF we are seeing first page blank in PDF. Here is the code how we are exporting report to PDF,
Protected Sub ExportToPDF(ByVal reportToExport As Telerik.Reporting.Report)
Dim deviceInfo As Hashtable = New Hashtable()
deviceInfo("FontEmbedding") = "Subset"
Dim reportProcessor As New ReportProcessor()
Dim result As RenderingResult = reportProcessor.RenderReport("pdf", reportToExport, deviceInfo)
Dim fileName As String = result.DocumentName + ".pdf"
Response.Clear()
Response.ContentType = result.MimeType
Response.Cache.SetCacheability(HttpCacheability.Private)
Response.Expires = -1
Response.Buffer = True
Response.AddHeader("Content-Disposition", String.Format("{0};FileName=""{1}""", "attachment", fileName))
Response.BinaryWrite(result.DocumentBytes)
Response.End()
End Sub
Do you have any idea how to resolve this?
Also, please see the attachment file which is the format of PDF we are getting.
Thanks
We are using telerik report version 'Telerik_Reporting_Q2_2010_v4_1_10_714_dev.msi'.
Previously, we have problem of having first page blank in the report viewer. So, to correct this problem, we added following code in the vb file and its working properly.
Public Sub New()
InitializeComponent()
detail.Height = Unit.Pixel(10)
End Sub
But while exporting same report to PDF we are seeing first page blank in PDF. Here is the code how we are exporting report to PDF,
Protected Sub ExportToPDF(ByVal reportToExport As Telerik.Reporting.Report)
Dim deviceInfo As Hashtable = New Hashtable()
deviceInfo("FontEmbedding") = "Subset"
Dim reportProcessor As New ReportProcessor()
Dim result As RenderingResult = reportProcessor.RenderReport("pdf", reportToExport, deviceInfo)
Dim fileName As String = result.DocumentName + ".pdf"
Response.Clear()
Response.ContentType = result.MimeType
Response.Cache.SetCacheability(HttpCacheability.Private)
Response.Expires = -1
Response.Buffer = True
Response.AddHeader("Content-Disposition", String.Format("{0};FileName=""{1}""", "attachment", fileName))
Response.BinaryWrite(result.DocumentBytes)
Response.End()
End Sub
Do you have any idea how to resolve this?
Also, please see the attachment file which is the format of PDF we are getting.
Thanks