locked
WebBrowser instead of reportviewer control RRS feed

  • Question

  • I decided to make a move to webbrowser control instead of reportviewer control, because I don't know how I can keep my  parameters values when I render my reports etc...

    But now I am trying to pass my credential through the webbrowser control, I means when I going to render my report in the webbrowser control I got prompted for SSRS credentials, and I want pass those directly.

    Question is, does anybody know how to pass credential using webbrowser?

    Thanks in advance.

    peter
    Thursday, March 31, 2011 2:37 PM

Answers

  • I found the problem!!!,

    I was trying to load my report in the Page_Load() event, then every time when I passed my parameters and hit "View Report" button I was causing a post back, that means that was in my report asking for parameters once again.

    Now I put a button and set the ReportViewer Control properties in the its Click event, and everytnig works perfect and i am able to use the report parameters bar.

    I think that after more than one month searching everywhere I deserved one solution.

     

    • Marked as answer by Challen Fu Thursday, April 21, 2011 1:14 AM
    Wednesday, April 20, 2011 9:01 PM

All replies

  • Hi Peter,

    I don't think Webbrowser control could replace Reportviewer. From your statement, it seems cannot pass the parameter value(asp.net control) to the server report even if you select the value,  this is a web dev issue, I still want to give you some advise, since you want to refresh partially, you should make use of ScripManager and UpdatePanel control to achieve refreshment partially.

    Thanks,
    Challen Fu

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Challen Fu Friday, April 8, 2011 11:15 AM
    • Unmarked as answer by peterposnag Tuesday, April 19, 2011 8:26 PM
    Tuesday, April 5, 2011 6:52 AM
  •        Hi Challen,
    Thanks for your answer,
    No, I am not using an additional control to pass the parameters, I am trying to use the default parameters bar of my reports.
    Let me explain again what is happening.
    I have a report, I am using ReportViewer Control to render it in my .aspx page. Here is the code to set some of the ReportViewer Control properties

           ReportViewerCredentials credentials = new ReportViewerCredentials(Session["user"].ToString(), Session["passw"].ToString(), mydomain);
          
           ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
           ReportViewer1.ServerReport.ReportServerCredentials = credentials;
           ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://mydomain:8080/reportserver_ws2008");
           ReportViewer1.ServerReport.ReportPath = Request.QueryString["Report"];
    When I render my report I got prompted to pass some parameters (in the default report's parameters bar), ok, I pass them and when I press the "View Report" button, the report returns again to the initial status (asking for parameters).
    Do you know why is that happening?
    Thanks in advance
    Peter
    Tuesday, April 19, 2011 8:38 PM
  • I found the problem!!!,

    I was trying to load my report in the Page_Load() event, then every time when I passed my parameters and hit "View Report" button I was causing a post back, that means that was in my report asking for parameters once again.

    Now I put a button and set the ReportViewer Control properties in the its Click event, and everytnig works perfect and i am able to use the report parameters bar.

    I think that after more than one month searching everywhere I deserved one solution.

     

    • Marked as answer by Challen Fu Thursday, April 21, 2011 1:14 AM
    Wednesday, April 20, 2011 9:01 PM
  • Thanks for sharing the information.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, April 21, 2011 1:15 AM