Click here to Skip to main content
13,048,805 members (86,251 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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";

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.

Posted 10-Dec-12 18:27pm
Updated 10-Dec-12 18:31pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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";

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 11 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100