Monday, March 19, 2012

How to create a PopUp Report

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

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.

|||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
|||

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)

|||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
|||

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.

No comments:

Post a Comment