Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .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
Edited 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
0 Maciej Los 245
1 OriginalGriff 210
2 Manfred R. Bihy 190
3 CHill60 180
4 _Amy 155
0 OriginalGriff 7,445
1 Sergey Alexandrovich Kryukov 6,157
2 Maciej Los 3,774
3 Peter Leow 3,448
4 CHill60 2,702


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 11 Dec 2012
Copyright © CodeProject, 1999-2014
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