Click here to Skip to main content
Rate this: bad
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.
Posted 10-Dec-12 19:27pm
Edited 10-Dec-12 19: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
0 Sergey Alexandrovich Kryukov 8,488
1 OriginalGriff 6,516
2 Peter Leow 3,647
3 Zoltán Zörgő 3,416
4 Richard MacCutchan 2,397

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