[英]SSRS : Programmatically generating a report
In a .net application, how can I generate a report and save it as some type of a file (preferably a pdf)? 在.net应用程序中,如何生成报告并将其另存为某种类型的文件(最好是pdf)? Is it possible?
可能吗? Also, is it possible to send a couple of parameters that the report needs?
另外,是否可以发送报告需要的几个参数?
I am able to add a web reference to ReportingServices2010.asmx
and query the report for properties. 我可以向
ReportingServices2010.asmx
添加Web引用,并在报表中查询属性。 (It returns just the name of report as a property). (它只返回报告的名称作为属性)。 But not sure how to proceed further?
但是不确定如何继续进行吗?
Yes, it is fairly simple. 是的,这很简单。 Using the
ReportExecutionService.Render
method you can render the report however you want. 使用
ReportExecutionService.Render
方法,可以根据需要呈现报告。 We've used this to run reports and attach them to emails automatically. 我们使用它来运行报告并将其自动附加到电子邮件中。
The MSDN site has some code to get you started . MSDN网站上有一些代码可以帮助您入门 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.