SSRS report in .NET

  • I build as SSRS report and deploy it.

    It is working properly in browser bu using the url http://localhost/reports.

    Then i used the same report for Web application and i used the following code and it is also wroking properly

    ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote

    ReportViewer1.ServerReport.ReportServerUrl = New Uri("http://localhost/ReportServer")

    ReportViewer1.ServerReport.ReportPath = "/Test4. Net/Report1"

    Dim parm As ReportParameter() = New ReportParameter(0) {}

    parm(0) = New ReportParameter("Item_Class", DDLItemClass.SelectedItem.Value)

    ReportViewer1.ServerReport.SetParameters(parm)

    ReportViewer1.ServerReport.Refresh()

    And i'm using the following code for windows application but it is not working properly. The code is executing fine but report is not displaying.

    ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote

    ReportViewer1.ServerReport.ReportServerUrl = New Uri("http://localhost/ReportServer")

    ReportViewer1.ServerReport.ReportPath = "/Test4. Net/Report1"

    Dim parm As ReportParameter() = New ReportParameter(0) {}

    parm(0) = New ReportParameter("Item_Class", "DDLItemClass.SelectedItem.Value")

    ReportViewer1.ServerReport.SetParameters(parm)

    ReportViewer1.ServerReport.Refresh()

    Please help me to solve this issue..

    Thanks in Advance

    Regards,

    Arun

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • What is the error you are getting?

    Are you running the windows application on the reporting services server? My guess is no, so you can't use http://localhost since the reportserver is located on another box. Change localhost to the report server's name.

  • Hi Jack,

    I'm running the application on the reporting services server only.

    But i changed http://localhost to http://servername. Still not working.

    But i didn't get any error..

    please help me

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • I wonder if you are having an issue due to the space and period in your report path? If you are not getting an error I don't really know what your problem may be.

    Are you sure permissions are being passed correctly?

  • Hi

    This is the code i written in web application and it is working fine for me.

    ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote

    ReportViewer1.ServerReport.ReportServerUrl = New Uri("http://localhost/ReportServer")

    ReportViewer1.ServerReport.ReportPath = "/Test4. Net/Report1"

    Dim parm As ReportParameter() = New ReportParameter(0) {}

    parm(0) = New ReportParameter("Item_Class", DDLItemClass.SelectedItem.Value)

    ReportViewer1.ServerReport.SetParameters(parm)

    ReportViewer1.ServerReport.Refresh()

    Only changes i made to work in windows application is the first line

    ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote

    But this is not working. No issues in permission.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • arunkumar.sp (11/20/2008)


    Hi

    This is the code i written in web application and it is working fine for me.

    ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote

    ReportViewer1.ServerReport.ReportServerUrl = New Uri("http://localhost/ReportServer")

    ReportViewer1.ServerReport.ReportPath = "/Test4. Net/Report1"

    Dim parm As ReportParameter() = New ReportParameter(0) {}

    parm(0) = New ReportParameter("Item_Class", DDLItemClass.SelectedItem.Value)

    ReportViewer1.ServerReport.SetParameters(parm)

    ReportViewer1.ServerReport.Refresh()

    Only changes i made to work in windows application is the first line

    ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote

    But this is not working. No issues in permission.

    I understand that you only made the change in the processing mode, but you HAVE changed the context since you arfe no longer running the code on the same box as the reports, so how do you know you do not have a permissions issue? How are the credentials being passed to the report server to verify that the user has rights to run the report? If you run the Windows application on the report server box does it work?

  • Hi

    Use the following code,it should work

    rptvwr.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

    rptvwr.ServerReport.ReportServerUrl = new Uri(REPORTSERVERURL)); rptvwr.ServerReport.ReportPath = REPORTPATH;

    List paramList = new List();

    paramList.Add(new ReportParameter("PARAMNAME1", System.DateTime.Now.Date.ToString()));

    paramList.Add(new ReportParameter(PARAMNAME2, System.DateTime.Now.Date.ToString()));

    rptvwr.ServerReport.SetParameters(paramList);

    rptvwr.RefreshReport();

    Thanks

    Ravi

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply