Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
with same http://120.45.112.149:80/ReportServer[^]
my report getting open but when i try with this setting get error

The request failed with HTTP status 404: Not Found.
XML
<connectionStrings>
		<add name="ConnCollege" connectionString="Data Source=.;Initial Catalog=College;Integrated Security=True"/>
		<add name="urlrpt" connectionString="http://120.45.112.149:80/ReportServer"/>
		<add name="user" connectionString="administrator"/>
		<add name="password" connectionString="password"/>
		<add name="domain" connectionString="120.45.112.149"/>
	</connectionStrings>



C#
ReportViewer rv = new ReportViewer();
       string url = WebConfigurationManager.ConnectionStrings["urlrpt"].ConnectionString;
       // Set the processing mode for the ReportViewer to Remote
       rv.ProcessingMode = ProcessingMode.Remote;
       IReportServerCredentials irsc = new CustomReportCredentials(WebConfigurationManager.ConnectionStrings["user"].ConnectionString, WebConfigurationManager.ConnectionStrings["password"].ConnectionString, WebConfigurationManager.ConnectionStrings["domain"].ConnectionString);
       rv.ServerReport.ReportServerCredentials = irsc;
       ServerReport serverReport = rv.ServerReport;
       serverReport.ReportServerUrl =
         new Uri(url);


       //reportViewer1.ServerReport.SetParameters(l);

       serverReport.ReportPath =
     "/College_Results/SSS";


       Microsoft.Reporting.WebForms.ReportParameter YEAR = new Microsoft.Reporting.WebForms.ReportParameter();

       YEAR.Name = "YEAR";
       YEAR.Values.Add("2013");


       rv.ServerReport.SetParameters(
    new Microsoft.Reporting.WebForms.ReportParameter[] { YEAR});
       ReportViewer1= rv; //or can do this in any way???
Posted
Updated 26-May-13 21:33pm
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900