0
我需要以編程方式以PDF格式保存SSRS報告(vb.net)。我知道報告何時呈現,我們可以從磁盤圖標旁邊的三角形保存爲PDF格式,但我不需要按此按鈕,而是使用vb.net代碼保存它。以PDF格式呈現和保存SSRS報告
請指教。 感謝
我需要以編程方式以PDF格式保存SSRS報告(vb.net)。我知道報告何時呈現,我們可以從磁盤圖標旁邊的三角形保存爲PDF格式,但我不需要按此按鈕,而是使用vb.net代碼保存它。以PDF格式呈現和保存SSRS報告
請指教。 感謝
這應有助於:
If reportViewer.ServerReport.IsReadyForRendering Then
Dim fileData As Byte() = reportViewer.ServerReport.Render("PDF")
System.IO.File.WriteAllBytes("C:\Path\filename.pdf", fileData)
Else
'report parameters are not properly set, warn user to check
End If
的
可能重複[推薦在代碼校正呈現報告(http://stackoverflow.com/questions/22730317/suggest-correction-in-code-渲染的報告) –