生成Reporting Services 2005 PDF报告并将其存储在磁盘上

时间:2020-12-07 08:21:52

Is there an easy way to generate a PDF report from an RDL that's been uploaded to Report Manager and put that file somewhere on the server's disk? I already have a location on disk to put the file, I just need to know how to programmatically generate the PDF. This is for SQL Server 2005 Reporting Services. Code in either VB or C# is fine.

有没有一种简单的方法可以从RDL生成PDF报告,该报告已上传到Report Manager并将该文件放在服务器磁盘的某个位置?我已经在磁盘上有一个位置来放置文件,我只需要知道如何以编程方式生成PDF。这适用于SQL Server 2005 Reporting Services。 VB或C#中的代码都可以。

2 个解决方案

#1


4  

This article will show you how you can generate PDF report from reporting service, without using report viewer. Only change you have to do is to write the result byte array into a file stream instead of sending it to response stream as shown in that example. The above mentioned example is using the web services provided by SQL reporting service to generate report.

本文将向您展示如何在不使用报表查看器的情况下从报表服务生成PDF报表。只需要进行更改就是将结果字节数组写入文件流,而不是将其发送到响应流,如该示例所示。上面提到的示例是使用SQL报告服务提供的Web服务来生成报告。

#2


1  

Do you have to do it programatically? Report Manager has this funcationality built in already. You just setup a new subscription for that report. Instead of setting the delivery as Email, change it to Windows File Share. You can also change the report format to PDF within those options.

你是否必须以编程方式进行? Report Manager已经内置了这个功能。您只需为该报告设置新订阅。而不是将传递设置为电子邮件,而是将其更改为Windows文件共享。您还可以在这些选项中将报告格式更改为PDF。

#1


4  

This article will show you how you can generate PDF report from reporting service, without using report viewer. Only change you have to do is to write the result byte array into a file stream instead of sending it to response stream as shown in that example. The above mentioned example is using the web services provided by SQL reporting service to generate report.

本文将向您展示如何在不使用报表查看器的情况下从报表服务生成PDF报表。只需要进行更改就是将结果字节数组写入文件流,而不是将其发送到响应流,如该示例所示。上面提到的示例是使用SQL报告服务提供的Web服务来生成报告。

#2


1  

Do you have to do it programatically? Report Manager has this funcationality built in already. You just setup a new subscription for that report. Instead of setting the delivery as Email, change it to Windows File Share. You can also change the report format to PDF within those options.

你是否必须以编程方式进行? Report Manager已经内置了这个功能。您只需为该报告设置新订阅。而不是将传递设置为电子邮件,而是将其更改为Windows文件共享。您还可以在这些选项中将报告格式更改为PDF。