Open a Performance Point Report in a New Window – JavaScript Solution

open-a-performance-point-report-in-a-new-window3

Same as the previous blog, we are presenting this blog as a solution to client’s request on “How to easily open a performance Point Report in a New Window?” The circumstance is actually our client has a performance Point dashboard that includes a multitude of Reporting Services reports and Performance Point Analytic Chart reports. Being just the measures of some kind of chart, the Reporting Services reports can’t be displayed. Our client wanted the solution to click on them and exhibit the underlying data.

Well… being that typical bug fixer, one of our Offshore SharePoint developers tried to dig out the problem first. The problem was actually the comprehensive data our client wanted to display was actually a bit large than the dash space allotted for actual chart or SSRS gauge. Therefore, all we needed is the tweak to display the detail data to open in a new window.

Call it an adversity or an unawareness of Microsoft engineers, there is no option in SharePoint settings for “Open report in new window” (I really hope Microsoft engineer read thisJ). So our developers needed to write a little JavaScript. reportingservices

Walkthrough Postulation:

• SSRS is in SharePoint integrated mode (this can be done in Native Mode as well).

• SSRS must be of 2008 or higher.
Tutorial:

The summary of this post is that you mainly require adding the JavaScript displayed below to the “Action” property of underlying data your user is going to hit in the report.

=”javascript:void(window.open(‘http://perfobased/sites/tannermanual/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/sites/ tannermanual /SSRS/BlogExampleReport.rdl’, ”, ‘width=1000, height=800, top=0, left=0, resizable=yes’))”

Where “http:// perfobased…” is the URL to your report, and “width=1000…” is the dimensions of the new window.

The primary thing we require to be acquainted with is the URL to the report, data that we would like to display in our new window. To get the URL, we’re just going to open the data in SharePoint and then copy it from the address bar of the browser. Nevertheless, you’ve possibly got some stuff at the end that you don’t require. For example, my report is called InstanceReportLeviate, and the URL is:

http://perfobased/sites/tannermanual/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/sites/tannermanual/SSRS/InstanceReportLeviate.rdl&Source=http%3A%2F%2Fmastvmbase%2Fsites%2FTavisBIDemo%2FSSRS%2FForms%2Fcurrent%2Easpx&DefaultItemOpen=1

 

If you want to remove everything after “reportname.rdl” it will look like this:

http://perfobased/sites/tannermanual/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/sites/ tannermanual /SSRS/ InstanceReportLeviate.rdl

Once you have got the report URL, you can add it to the URL in the featured JavaScript as displayed above. Currently, you have to add JavaScript to the report that the user will click on in the dashboard. In our case this report is a gauge. So we’ll have to:

 

  1. Right-click on the Gauge in design mode and select Properties.2. Choose Action from the Properties window.

    3. Choose Go to URL as the action.

    4. Hit on the Fx button right next to the Select URL field, and copy in our JavaScript.

And there you go…Hit on OK on all the opened windows and position the report to test it.

NOTE: The report must be deployed in order for the JavaScript to work. It will not work in the preview window of your report designer.

N.B. The data must be arranged as this will make JavaScript to work. It won’t work in the preview window of your report designer.

Now let’s say we would like to pass a parameter from our original report to the report that opens in the new window. We can also do this through the URL by adjusting our JavaScript like so:

=”javascript:void(window.open(‘http://perfobased/sites/tannermanual/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/sites/tannermanual/SSRS/InstanceReportLeviate.rdl&rp:p_ReportParameter1=ParameterValue’, ”, ‘width=1000, height=800, top=0, left=0, resizable=yes’))”

In the above illustration, we’re passing a value of “ParameterValue” into our parameter named “p_ReportParameter1”.

It’s worth noting that you can also control several aspects of your report viewer toolbar by passing parameters in via the URL. There is an excellent post about doing so here.

No doubt it is messy and tricky to administer through environments, the functionality is possible. If you have several reports that need to be moved between dev/uat/prod, I highly suggest leveraging shared data sets to store your base report URL:

http://perfobased/sites/tannermanual/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/sites/ tannermanual /SSRS/

Arranging so will permit you to modify it in one place, instead of having to do so in each particular report when you deploy to a new environment.

This post is brought to you by Softree Consulting

Softree Consulting employs SharePoint consultants, who are experienced in writing for a multiplicity of SharePoint verticals including technical, promotional, creative, branding content, cataloguing and ethical media comprising journalism.

With more than 10 years of industry experience these professionals have the best resources to deliver optimum results. They have been satisfying customers with some of the best SharePoint Strategies. In case you need experts for Offshore development for SharePoint 2016, we have got you covered.

Softree Consulting is an award-winning SharePoint consultancy that has been working with clients from across the globe to transform workplaces with tools and platforms from Microsoft technology. As a widely recognized organization, we are commonly approached to incorporate technical excellence and innovative design into all our customer actions.....

Site Footer