Click here to Skip to main content
12,454,612 members (52,685 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# .NET C#4.0
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.

Thanks,
Ramu.
Posted 10-Dec-12 18:27pm
Updated 10-Dec-12 18:31pm
v2

1 solution

Rate this: bad
 
good
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";
  Permalink  

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.160826.1 | Last Updated 11 Dec 2012
Copyright © CodeProject, 1999-2016
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