locked
How to create a PopUp Report RRS feed

  • Question

  • Hi Friends,

    No I m not looking for a drill down report.

    I want a hiperlink on my country sales reports. When user will click on this hiperlink one popup window will open(Popup report). This popup report will contain some input parameter eg list box of sales person name and list of country to be selected select.

    One user will select country germany and sales person as  Mr  Bin and click go on the poup report I want the popup report to be closed and based on the input(country germany and sales person as  Mr  Bin ) want my country sales reports to get updated.

    Hope you undestand my qn.

    thanks

    Novin
    Thursday, September 6, 2007 4:58 PM

Answers

  • You should be able to achieve this, except the popup would not be a report. It would need to be some custom html page that collects user input and then submits it to opener page with the selection.

     

    To navigate to the popup:

    In your report add a textbox with an action of "Jump to URL" and set this to

    javascript:window.open()

    OR

    javascript:window.showModalDialog()

     

    To pass parameters from the popup:

    Call a javascript function onclick of the submit button that does something like

     

    Code Snippet

    function loadReport(param1)

    {

      window.opener.location.href = opener.location.href + "&param1=" + param1;

      window.opener.focus();

      window.close();

    }

     

     

    I've not tried this but theoretically it should work.

    Monday, September 10, 2007 5:43 AM
  • You are in control of the popup and it's implementation is totally up to you as long as your web server can handle it. Possible options are:

    • static html with hard coded lists of options
    • dynamic webpage, the technology is immaterial but you're likely to get better integration using ASP.NET 2.0
      • parametrs could be queried directly from database tables
      • OR you can connect to the RS web service and use the queries and connections defined within the report RDL to retrieve a collection of ValidValues (recommended)

    That way you'll just be using your popup for the layout / presentation aspect of capturing the user input.

     

    Good luck and let me know how this works out for you.

    Monday, September 10, 2007 6:25 PM

All replies

  • You should be able to achieve this, except the popup would not be a report. It would need to be some custom html page that collects user input and then submits it to opener page with the selection.

     

    To navigate to the popup:

    In your report add a textbox with an action of "Jump to URL" and set this to

    javascript:window.open()

    OR

    javascript:window.showModalDialog()

     

    To pass parameters from the popup:

    Call a javascript function onclick of the submit button that does something like

     

    Code Snippet

    function loadReport(param1)

    {

      window.opener.location.href = opener.location.href + "&param1=" + param1;

      window.opener.focus();

      window.close();

    }

     

     

    I've not tried this but theoretically it should work.

    Monday, September 10, 2007 5:43 AM
  • Hi Adam,

    Thanks a lot for your kind and quick reply.

    I will try this out. One qn. then the popup page(which must not be a report) need to be a php or JSP page which will have some database connection code and it will fill the input parameters listboxes.

    Correct me if I am wrong and also suggest me the popup page implementation bcas I m new to microsoft technologies.

    Thanks
    Novin
    Monday, September 10, 2007 5:13 PM
  • You are in control of the popup and it's implementation is totally up to you as long as your web server can handle it. Possible options are:

    • static html with hard coded lists of options
    • dynamic webpage, the technology is immaterial but you're likely to get better integration using ASP.NET 2.0
      • parametrs could be queried directly from database tables
      • OR you can connect to the RS web service and use the queries and connections defined within the report RDL to retrieve a collection of ValidValues (recommended)

    That way you'll just be using your popup for the layout / presentation aspect of capturing the user input.

     

    Good luck and let me know how this works out for you.

    Monday, September 10, 2007 6:25 PM
  • Hi Adam,

    As per your explaination it looks possible to me.

    But I have one more doubt regarding the parameter passing to the parent report from the popup report and auto refreshing the parent report.

    Using following code I can pass the selectede parameters back to the detail report but I want that detail report be get refreshed(hit the dabase and re executing the report sql) without user intervantion with new parameters. Is that possible or the user need to manually again click the some controll to get the new data with passed parameters from the popup page.

    function loadReport(param1)

    {

      window.opener.location.href = opener.location.href + "&param1=" + param1;

      window.opener.focus();

      window.close();

    }


    Thanks
    Novin
    Tuesday, September 11, 2007 9:40 PM
  • Whenever you change the value of location.href in javascript IE automatiacally posts back. This would be driven from the javascript and no user intervention is required.

    Wednesday, September 12, 2007 2:10 PM