Auto Refresh SSRS Reports in SharePoint 2010 Part II

So it turns out that refreshing all reports on a dashboard may not provide you with the desired user experience; Content Editor to the rescue.

Add a Content Editor Control web part to your Web Page

First find the ID of the Refresh Button on on the SSRS webpart tool bar of the report to be refreshed; I used IE Developer tools to find the ID.

Once you have the ID,  add the following script to the content Editor control and every 60 seconds the report gets refreshed.

<script type=”text/javascript”>

function refreshReport()
{
var btn = document.getElementById(“ID Goes Here“);
btn.click();
}

setInterval(‘refreshReport()’ ,60000);

</script>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s