将RDLC作为嵌入式资源加载到Viewer中? [英] Load RDLC as embedded resource into the Viewer?
本文介绍了将RDLC作为嵌入式资源加载到Viewer中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有一种简单的方法可以将作为嵌入式资源的RDLC文件以编程方式加载到Report Viewer控件中?
到目前为止我看到的所有示例都使用FileStream对象来读取来自磁盘的RDLC文件,但我想找到一种方法来使用嵌入式资源RDLC文件,而不必从文件系统中读取任何内容。
谢谢。
Is there an easy way to programatically load an RDLC file which is an embedded resource into the Report Viewer control?
All of the samples i've seen so far use a FileStream object to read the RDLC file from the disk but I would like to find a way to use the embedded resource RDLC file instead and not have to read anything from the file system.
Thanks.
推荐答案
如果嵌入报告,您可以使用:
在C#中:
b $ b
Hi,
You can use, if the report is embedded:
in C#:
reportViewer1.LocalReport.ReportEmbeddedResource = "[Your_Project].[YourEmbeddedReport].rdlc";
删除括号的课程,例如,Project1 .Report1.rdcl
Remove the brackets ofcourse, for example, Project1.Report1.rdcl
这篇关于将RDLC作为嵌入式资源加载到Viewer中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文