rdlc报告中的路径问题 [英] Path issue problem in rdlc reports

查看:76
本文介绍了rdlc报告中的路径问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我在RDLC报告中面临路径问题,下面是代码,我正在使用路径..... < br $>


Hi friends,

I am facing a path issue problem in RDLC Reports and below is the code, i am using for giving path.....

string MainPath = Application.StartupPath;
string RptPath = MainPath.Replace(@"SEMIS_Start\bin\x64\Debug", "");          
           this.reportViewer1.LocalReport.ReportPath = RptPath + @"Zanzibar\XtraReports\Modules\Forms\EmployeeAttendanceGraphical_En.rdlc";





请,让我知道在为应用程序创建设置时我需要给出的正确路径。



请解决此问题。



谢谢,

Ramu。



Please, let me know the correct path which i need to give where it works well while creating set up for the application.

please solve this problem.

Thanks,
Ramu.

推荐答案

请按照以下代码进行ASP.Net并修改相同的WINforms代码



服务器路径:



Please follow the below code for ASP.Net and modify same code for WINforms

Server path:

<add key="ReportServerUrl" value="http://Local/ReportServer"/>
<add key="ReportServerFolder" value="/Reports/"/>
<add key="ReportServerUser" value="User"/>
<add key="ReportServerPass" value="Password"/>
<add key="ReportServerDomain" value="ServerIP"/>







获取路径:






Getting Path :

ReportServer = ConfigurationManager.AppSettings["ReportServerUrl"].ToString();
UserName = ConfigurationManager.AppSettings["ReportServerUser"].ToString();
Password = ConfigurationManager.AppSettings["ReportServerPass"].ToString();
ReportDomain = ConfigurationManager.AppSettings["ReportServerDomain"].ToString();
ReportServerFolder = ConfigurationManager.AppSettings["ReportServerFolder"].ToString();







rptViewer.ProcessingMode = ProcessingMode.Remote;
           rptViewer.ServerReport.ReportServerUrl = new Uri(ReportServer);





rptViewer.ServerReport.ReportPath = ReportServerFolder +RptGENERAL.rdl;



rptViewer.ServerReport.ReportPath = ReportServerFolder + "RptGENERAL.rdl";


这篇关于rdlc报告中的路径问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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