我想自动将SSRS转换为pdf并存储到硬盘驱动器上的某个位置(例如C:\ My Reports)如何实现这一目标?
谢谢
使用报告服务Web服务。完成此操作的一个不错的帖子是:http://geekswithblogs.net/bsherwin/archive/2007/04/29/112094.aspx
Dim result() As Byte
Dim report As String = "/Sample Reports/Sales Order Detail"
Dim format As String = "PDF"
Dim historyid As String = Nothing
Dim devinfo As String = ""
Dim credentials() As SQLRS.DataSourceCredentials = Nothing
Dim showhide As String = Nothing
Dim encoding As String
Dim mimetype As String
Dim warnings() As SQLRS.Warning = Nothing
Dim reporthistoryparams As SQLRS.ParameterValue() = Nothing
Dim streamid() As String = Nothing
Dim sh As New SQLRS.SessionHeader
ws.SessionHeaderValue = sh
Next, get the result from the web service:
result = ws.Render(report, format, historyid, devinfo, parameters, _
credentials, showhide, encoding, mimetype, reporthistoryparams, _
warnings, streamid)
Dim stream As FileStream = File.Create("C:\My Reports\report.pdf", results.Length)
stream.Write(results, 0, results.Length)
stream.Close()
该参考文献已不再可以在GeeksWithBlogs上访问:http://geekswithblogs.net/bsherwin/archive/2007/04/29/112094.aspx
您是否能够提供有关如何创建SQLRS对象并建议SQLRS对象类型是什么的更多信息?