13. dubna 2012 19:34
I have a simple question, does anyone know a way to display a countdown timer in a report? The report will be viewed via the SSRS viewer web part within sharepoint, but along with the static information displayed on the report I want to display a countdown timer which shows a countdown to the next event and i want it to be active (e.g. the user can see it counting down the seconds and minutes till this next event is scheduled).
13. dubna 2012 19:41
see the link below. give it a whirl. let us know if it helps you out.
13. dubna 2012 19:58Interesting idea, will have to think this through. If anyone comes across any simple examples of this, would love to see it in action.
16. dubna 2012 7:11Moderátor
<title> Countdown time</title>
countdown_start("timer","07/29/2009 2:00 PM")
var given_date = new Date(givendate);
var cur_date = new Date();
diff = new Date(given_date - cur_date);
secs = Math.floor(diff.valueOf()/1000);
function calculate(secs, num1, num2)
s = ((Math.floor(secs/num1))%num2).toString();
if (s.length < 2)
s = "0" + s;
var format = "%%D%% Days %%H%%:%%M%%:%%S%%";
output = format.replace(/%%D%%/g,calculate(secs,86400,100000));
output = output.replace(/%%H%%/g,calculate(secs,3600,24));
output = output.replace(/%%M%%/g,calculate(secs,60,60));
output = output.replace(/%%S%%/g,calculate(secs,1,60));
if(secs > 0)
document.getElementById(divid).innerHTML = output;
setTimeout("count_back('" + divid + "'," + (secs-1) + ");", 990);
document.getElementById(divid).innerHTML = "Auction Over";
TechNet Community Support
Please remember to mark the replies as answers if they help.
16. dubna 2012 11:20
Yeah, sounds good in theory, but I don't think this will work. I experimented with some very basic injecting of HTML using these methods and they do not work. I do not think it is possible to implement any custom html using these methods. I think the only HTML control one will have in a report will be via formatting as HTML within a textbox which is restricted to just a handful of controls.
If anyone can show me a working example of these methods, would love to see it, right now I can't create one nor find one. Logically they sound like they should work, but they do not in reality!