sameer gadade

sameer gadade

  • NA
  • 61
  • 55.6k

calling rdl report in asp page

Jun 19 2013 3:44 AM
hi
 i am using vs 4.0
and i want to call rdl report in my aspx page from reporting server. can any one tell me how to get it .
i tried with following code but it gives me an error as

  • The request failed with HTTP status 401: Unauthorized.

  • here is my cs code

    • MyReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                      
                      MyReportViewer.ServerReport.ReportServerCredentials = new ReportServerNetworkCredentials();
                      
                     
                      MyReportViewer.ServerReport.ReportServerUrl = new Uri(@"server url");
                      MyReportViewer.ServerReport.ReportPath = "Daily Reports/Facility Log";
                      MyReportViewer.ShowParameterPrompts = false;
                      MyReportViewer.ShowPrintButton = true;
                     // if report requires parameter
                      Microsoft.Reporting.WebForms.ReportParameter[] reportParameterCollection = new Microsoft.Reporting.WebForms.ReportParameter[1];
                      reportParameterCollection[0] = new Microsoft.Reporting.WebForms.ReportParameter();
                      reportParameterCollection[0].Name = "INVOICEID";
                      reportParameterCollection[0].Values.Add("ABC011223");

                      MyReportViewer.ServerReport.SetParameters(reportParameterCollection);
                      MyReportViewer.ServerReport.Refresh();

      can any one help me out?????



Answers (1)