Javascript error when opening a drill through report in a new sharepoint window

  • Hi

    I'm developing reports in SSRS (SQL Server 2008 R2) and deploying to SharePoint 2010

    I want to provide Jump to URL functionality for some drill through reports

    I've written the Javascript below and entered it into the primary reports jump to area:

    ="void(window.open('http://sharepoint/infotech/itcd/reporting/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/infotech/itcd/reporting/Test/Aged%20Calls%20DT.rdl&rs:Command=Render&rc:Parameters=false&Filter=" & Parameters!Filter.Value & "'))"

    The code opens the correct drill through report but then stops and the user is asked to manually enter the 'Filter' parameter.

    However, the addresss has been automatically appended with the correct parameter information

    In fact if you manually enter the paramter and click on apply, the report runs as it should and the address in the resulting new window is exactly the same (examples below):

    Automatically entered address but waiting for parameter to be manually entered:

    http://sharepoint/infotech/itcd/reporting/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/infotech/itcd/reporting/Test/Aged Calls DT.rdl&rs:Command=Render&rc:Parameters=false&Filter=ARCHITECTS

    Address of report in new window once Filter parameter has been manually entered and Apply clicked:

    http://sharepoint/infotech/itcd/reporting/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/infotech/itcd/reporting/Test/Aged Calls DT.rdl&rs:Command=Render&rc:Parameters=false&Filter=ARCHITECTS

    Does anyone have any idea why the javascript is not automatically running the report?

  • I have a report that opens a new window through javascript and it works through the ReportServer/ReportViewer.aspx page. I am assuming your RSViewerPage.aspx page is essentially the same. I am not running in Sharepoint integrated mode. I am just using the standard Reporting Services 2008 R2 install.

    I updated your code below similar to what mine looks like. You may have to take the spaces out between the words javascript and the colon at the beginning. I had to put spaces in there for the post here to take it):

    ="javascript : void(window.open('http://sharepoint/infotech/itcd/reporting/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/infotech/itcd/reporting/Test/Aged%20Calls%20DT.rdl&rs:Command=Render&rc:Parameters=false&Filter=" + Parameters!Filter.Value + "'))"

Viewing 2 posts - 1 through 2 (of 2 total)

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