[Last Call] Learn how to a build a cloud-first strategyRegister Now


SSRS - Auto Advance to either another report or another page

Posted on 2014-08-28
Medium Priority
Last Modified: 2014-09-17
I'm on SQL 2012 using SSRS
I created reports using report builder 3.0

I have the need in my facility to expect SSRS to automatically advance after n seconds to the next page of my report.  Or, I would like it to move to another report and continue to loop through this.

I understand SSRS does not do that natively.  I really wish it did because we have 60" TV's we use as dashboards and it would be great to automatically advance through a multi page report.

So, what can I use to do this?  If you can provide either an example or a website that can help explain how to, I would greatly appreciate it.
Question by:BruceLawrence

Assisted Solution

prequel_server earned 300 total points
ID: 40292012
I've set something up like this before for a client. They wanted to show an SSRS report in full screen on a wall-mount and have it refresh automatically, as well toggle through different reports. I used firefox browser and plugins.

here's an example.


You can maximize FF to full screen and it looks relatively clean but you have to fiddle with resolution and the SSRS report itself to make it fit the screen properly.  

SSRS is not a good dashboarding solution imo but it can be used that way if you must.

note1: Regarding auto refresh, there is way to do this in the SSRS report itself however this didn't work for me very well and I  ended up using the plugin for a full page refresh.

note2: I'm a big Chrome lover but unfortunately it doesn't work well with SSRS, eg. calendars controls don't work, so firefox is the best for this imo and I would not attempt to use IE add-ins.

good luck, and let me know if you need more help.
LVL 37

Accepted Solution

ValentinoV earned 1200 total points
ID: 40292068
With a trick it is possible to use the AutoRefresh report property for this.  In short: you can keep track of a counter in a table and use this counter to decide what needs to get shown.  It's not really an "advance to next page" thing but more like "if count = 1 then show data 1 else if count = 2 then show data 2" and so on, so you can use the counter to show different things.  Subreports or using the Hidden property to show/hide certain parts are an option too.

Here's how you can implement a really basic version of this system.  First you need to set up a table in a database somewhere:

CREATE TABLE dbo.ReportRefresh(
	RefreshCounter int NULL

insert into dbo.ReportRefresh select 0;

Open in new window

Then in the dataset that returns your data you need the following code:

declare @maxCount int = 12;
declare @currentCount int = (select ISNULL(RefreshCounter, 0) from dbo.ReportRefresh);
declare @nextCount int = (select (@currentCount % @maxCount)+1);

update dbo.ReportRefresh set RefreshCounter = @nextCount;

select @nextCount Cnt;

Open in new window

This code limits the counter to 12 and will switch back to 1 once 12 has been reached.

Depending on how you decide to implement this system you may want to replace the SELECT statement with one that actually returns your data, possibly in combination with IF or CASE statements.  Or you can just return the count value and work with that in the report itself.  Or a combination of both :)

Please note that in BIDS preview it will seem as if this system doesn't work.  That's because BIDS uses cached data files. Once the report is deployed to the server it will reload the dataset on each AutoRefresh action.

Author Closing Comment

ID: 40328099
Thanks for the feedback.  Both solutions pushed me toward a different one but the second was more in line with what I came up with.

I ended up using an HTML page that basically cycled through a few hyperlinks.  Here is the site I got it from:

This code works great

<script type="text/javascript">
var pages = [
var currentIndex = -1;
function startCycle() {
    var iframe = document.getElementById("iframe1");
    currentIndex = (++currentIndex) % pages.length;
    iframe.onload = function() {
        window.setTimeout(50, startCycle); //Currently set to change every 5 seconds
    iframe.src = pages[currentIndex];
window.onload = startCycle;</script>
            <iframe  id="iframe1"  frameborder="0"  vspace="0"  hspace="0"  marginwidth="0"  marginheight="0"
                  width="900"  scrolling="no"  height="900">

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question