Few days back one of my colleagues came up with a strange requirement. His client wants to display one OBIEE Dashboard in the giant screen and wants the reports to be automatically refreshed in the page.
We have 2 ways to achieve this.
1. Refresh the entire page
2. Refresh the individual report
Let's go a little deep into this. But before we begin, one important prerequisite of this is the tables behind the report must be Cache disabled.
1. Refresh the entire page
This one is actually pretty strait forward. What I need is the code below :
<META HTTP-EQUIV = "REFRESH" CONTENT = "60">
<CENTER><p><b>Auto Reload 60 seconds</b></p></CENTER>
I create a simple report, I can take any column from any subject area.
And I add a Static Text view and paste the above code.
The 2nd line is completely optional. If you do not want any text to be displayed, skip this line.
Let me save this report as 'Auto Load'. Next I go to the dashboard page which I want to refresh automatically. In this case I go to Sample Demo Dashboard.
And I place the 'Auto Load' in this page. If You want you can keep this section hidden too.
When I run the page I will see reports getting refreshed after every 60 seconds.
Pretty cool huh ... ππ
We have 2 ways to achieve this.
1. Refresh the entire page
2. Refresh the individual report
Let's go a little deep into this. But before we begin, one important prerequisite of this is the tables behind the report must be Cache disabled.
1. Refresh the entire page
This one is actually pretty strait forward. What I need is the code below :
<META HTTP-EQUIV = "REFRESH" CONTENT = "60">
<CENTER><p><b>Auto Reload 60 seconds</b></p></CENTER>
I create a simple report, I can take any column from any subject area.
And I add a Static Text view and paste the above code.
The 2nd line is completely optional. If you do not want any text to be displayed, skip this line.
Let me save this report as 'Auto Load'. Next I go to the dashboard page which I want to refresh automatically. In this case I go to Sample Demo Dashboard.
And I place the 'Auto Load' in this page. If You want you can keep this section hidden too.
When I run the page I will see reports getting refreshed after every 60 seconds.
And if you check the session logs, you can get a confirmation for this also.
Next
let's focus on doing it for individual reports.
2. Refresh the individual report
For this one we need to add the script for the reports, which needs to be refreshed.
First I create a report, which I want to be refreshed automatically.
I create a report with Tile view to show # of Employees
I go to the page, and add the report that needs to be refreshed automatically, and add 'Refresh' link for the report.
Next I view the source of this page and search for 'javascript:HereLink'. It will take me to the code for refresh link.
In my case it is javascript:HereLink('d:dashboard~p:f0315tdu3cqtmc6d~r:538mu6nhk4hpmbj0','Refresh')
I need the highlighted portion of the code above to use in my script. I add the script below in a Narrative View in my report
<html>
<body>
<script>
var myVar=setInterval(function(){reportrefresh()},5000);
function reportrefresh()
{
setTimeout("javascript:HereLink('d:dashboard~p:f0315tdu3cqtmc6d~r:538mu6nhk4hpmbj0','Refresh');",1000);
}
</script>
</body>
</html>
I am using 2 functions here,
a. setInterval : calls a function after every t time interval. In this case it is 5000 or 5 secs
b. setTimeout : calls a function after t time. In this case it is 1000 or 1 sec
In the compound view we can see the report getting auto refreshed.
In the dashboard page, where I have this report, I select 'Compound Layout 1' to be displayed.
It is time to test if it is working properly or not. My report is showing # of Employees as 31.
Next I add 4 new rows in my Employee table in the DB.
And I find my report in the dashboard has got automatically refreshed and is showing # of Employees as 35.
And if you check the session logs, you can get a confirmation for this also.
Thanks, it's working for me.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHi
ReplyDeleteHow does keep the session active?
After some time even if your page has refreshed several times, you should log in to OBIEE again. I read about session time out change in instanceconfig.xml file (ClientSessionExpireMinutes parameter), but it effect all reports and dashboard, not your specific dashboard
I am looking for solution for one specific dashboard or for specific user
javascript:HereLink('d:dashboard~p:f0315tdu3cqtmc6d~r:538mu6nhk4hpmbj0','
ReplyDeleteWhere i get this link from my dashboards kindly guide
I feel this is a very good and relatable post to that of the technical aspects of Tableau and other related operations as well.
ReplyDeleteTableau Rest Api Connection
The tutorial is very helpful for a first timer like me, by the way if you could have given a tutorial on creating a free website, it would have been very helpful for newbies like me.
ReplyDeleteThank you
car wreckers Adelaide
cash for cars sunshine coast
cash for cars glenelg
Wow, that was strange. I just wrote a really long comment but after I clicked submit my comment didn't show up. Grrrr... well, I'm not writing all that over again. Anyways, just wanted to say fantastic blog!
ReplyDeletecash for cars brisbane
cash for cars gold coast
cash for cars sydney
cash for cars Ipswich
Excellent post, its amazing that its necessary really but it is. I think Iarfhlaith's point about bigger buttons attracting more comments is very true. I'm subtle that way.
ReplyDeletecash for cars ipswich
sell your car Ipswich
We pay our customers instant cash up to $9,999 without any waiting time. It is our policy to not let customers wait for their money. We also provide free towing services, so customers save even more money when dealing with us. This strategy has been a great success with our customers in Queensland. Through this, we gained a lot of goodwill from our customers.
ReplyDeletecash for cars removal gold coast
We pay you a big amount, for your unwanted cars, which means you get more cash for cars in Sydney. Our services include buying all types of vehicles all over Sydney.
ReplyDeletecash for cars sydney
Cash for Cars can be regarded as the most convenient and fast way to dispose off your old free car removal Brisbane today. They are experts in accepting all kinds of vehicles, be it cars, bikes or even farm vehicles.
ReplyDeleteRegard: cash for scrap cars
We pay the highest price for damaged cars, up to $16,000 in instant cash. Apart from that, to ensure quality customer service, we have trained our staff to provide the best customer service and hired trained evaluators to inspect cars.
ReplyDeletecash for cars brisbane
I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. Read here more about Safe Ways To Accept Payment When Selling Your Car. All sellers expect to earn a certain amount of profit from the sale of their vehicle. The pay is something that they look forward to.
ReplyDeleteHello, this weekend is good for me, since this time i am reading this enormous informative article here at my home. used auto parts
ReplyDeleteHello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. λ¨Ήνκ²μ¦
ReplyDeleteFantastic goods from you, man. I've understand your stuff previous to and you are just extremely fantastic. I really like what you have acquired here, really like what you are stating and the way in which you say it. You make it entertaining and you still take care of to keep it sensitive. I can't wait to read far more from you. This is really a tremendous site. cash for scrap cars carseldine
ReplyDeleteYou actually make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. Instant Cash, Quick Services & Free Car Removal – sell my car adelaide is All in One Company in SA! Get Your Car Sold Faster, Top Cash Payments Up To 9,999,
ReplyDelete