Visual Studio中RLDC文件的自定义位置 [英] Custom Location of RLDC file in visual Studio

查看:111
本文介绍了Visual Studio中RLDC文件的自定义位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的场景:

1.我在winform中有项目,它使用RDLC文件作为我的报告,然后显示在报告查看器中。

2.这些rldc文件当前位于我的应用程序的根文件夹中,因为我使用visual studio中的add函数添加它们。





我的困境是,在接下来的几个月里,这些rdlc文件将需要重新布局(字段和参数不会改变,只是如何报告外观)并且我可能不会做重新布局的人。



只是为了方便以后编辑它的人,以某种方式防止从根应用程序文件夹中删除任何文件的事故。



我有没有办法将这些rdlc文件分组到一个单独的文件夹中(完全不同的目录中的文件夹或者只是在应用程序的根文件夹中可以)?



除了可以编辑rdlc文件的内置水晶报告的Visual Studio之外,还有什么应用程序吗?如果有的话,请提供一些指向这些应用程序的链接。



非常感谢您提前。 :)

解决方案

定义web.config中的rdlc路径然后使用它

动态绑定rdlc


我能够通过以下方式实现:

1.使用Visual Studio中的添加项添加RDLC报告

2.使用解决方案资源管理器排除文件

3.将文件移动到所需的位置或目录

4.在代码中引用rdlc文件



 reportViewer.ProcessingMode = ProcessingMode.Local 
reportViewer.LocalReport.ReportPath = rdlc文件的目录







它对我来说很有用。


Here's my scenario:
1. I have project in winform which uses RDLC files for my reports and are then displayed in report viewer.
2. These rldc files are currently located in the root folder of my application as I added them using the add function in visual studio.


My predicament is that in the next few months these rdlc files will require a re-layout (the fields and paramters won't change, just how to report look) and it is possible that I wont be the one doing the re-layout.

Just for easy access of those who will edit it later on and somehow prevent accidents of deletion of any files from the root application folder.

Is there a way for me to group these rdlc files in a separate folder(either a folder in totally different directory or just within the root folder of the app is okay)?

Also are there any applications aside from Visual Studio that has built in crystal report, that can edit the rdlc file? Please provide me with some links to those apps if there are any.

Thank you very much in advance. :)

解决方案

definen the rdlc path in web.config then use it
to bind rdlc dynamicly


I was able to somehow do it by:
1. Adding the RDLC report using the Add Item in Visual Studio
2. Exclude the File using the Solution Explorer
3. Move the file to desired Location or directory
4. Reference the rdlc file in code by

reportViewer.ProcessingMode = ProcessingMode.Local
reportViewer.LocalReport.ReportPath = "directory of the rdlc file"




It worked great for me somehow.


这篇关于Visual Studio中RLDC文件的自定义位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆