简体   繁体   English

通过C#扩展钻取报表查看器导出为PDF?

[英]Export to PDF with expanded drilldown the report viewer by C #?

How do I export to excel or pdf with all data already expanded (Drill Down) in the report viewer. 如何在报表查看器中将所有已展开的数据(向下钻取)导出到excel或pdf。

Export to PDF for example, the data that are part of the drilldown not appear. 例如,导出为PDF,不显示作为深入分析一部分的数据。

Is there any way to configure it via C #? 有没有办法通过C#配置它?

Here's a part of my code: 这是我的代码的一部分:

byte[] bytes = report.ServerReport.Render("PDF");
string fsFileName = "C:\Reports\MyReport.pdf";
FileStream fs = new FileStream(fsFileName, FileMode.Create);
fs.Write(bytes, 0, bytes.Length);
fs.Close();

I thank you very much! 我非常感谢你!

The Report viewer loads a report definition language (RDL) file, and can then output the result in the viewer or like you want to do export it to PDF/Word/Excel... 报表查看器加载报表定义语言(RDL)文件,然后可以在查看器中输出结果,或者将其导出为PDF / Word / Excel ...

Are you working on a web app? 你在网络应用程序上工作吗? or desktop? 还是桌面? anyway here is a link where you can open and write a PDF file to the browser directly in ASP.NET. 无论如何, 这里有一个链接 ,您可以直接在ASP.NET中打开并将PDF文件写入浏览器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM