Javascript to Refresh All OBIEE Dashboard Analysis

Javascript to Refresh All OBIEE Dashboard Analysis

Get Social!

oracle-biOBIEE isn’t designed for (near) real time reporting, and as such doesn’t have an out of the box page refresh option.

There are times when I’ve needed a dashboard to be refreshed – when looking at query performance dashboards, for example, and would like the charts and tables to be constantly updated.

After searching on-line I found a few different ways to to refresh a dashboard but they all refreshed the whole page, rather than just the Analysis themselves. It’s not the end of the world, but it results in the whole page flickering as the Browser reloads it. It’s most annoying when you’re half way through the ‘Dashboards’ menu, about to click the navigate away and BAM! The page refreshes and you loose your position on the menu.

The following script is a combination of HTML, CSS and JavaScript code to loop through each Analysis on a single Dashboard page and issue the OBIEE Refresh command. A small box towards the bottom left hdashboard-refreshand side of the page that overlays the Dashboard with some controls and stats for the page refresh. It will show when the page was last refreshed, a countdown in seconds to the next refresh and a button to start and stop the automatic refresh.

chrome_256x256 Works in Chrome 44 internet-explorer_256x256 and Internet Explorer 8 and 10

There are 3 variables that are user changeable:

  • vRefreshDuration controls how many seconds between refreshes. Make sure this is higher than how long each query takes, otherwise an Answer will be asked to refresh before it’s finished refreshing!
  • vMessageLastRefreshed is the message displayed before the date and time of the last refresh.
  • vMessageNextRefresh is the message displayed before the countdown in seconds to the next refresh.

Feel free to change the below code, but please keep the header information. If you make any improvements, please let me know!

To add the Refresh code to a Dashboard, create a Text Dashboard drag-text-dashboard-objectObject and drag it onto any Dashboard that you’d like to automatically refresh. Then paste the below code into the Text box and check the ‘Contains HTML Markup’ checkbox. Click save and view your Dashboard!

 

 

 

 


Related posts:


12 Comments

Wes L

29-Mar-2016 at 10:13 pm

James – thanks for this awesome idea. However, have you experienced any issues with the system counting down but not refreshing the data?

    james.coyle

    30-Mar-2016 at 6:44 am

    Hi Wes, it’s always worked for me. Which version of OBIEE, and which browser are you using? If you Inspect the page, does the Console show any errors?

Chris A

10-Jun-2016 at 2:51 pm

This is great. Seems to be working for me.
Wes L. — maybe your reports are refreshing but they are showing cached results? Have you tried bypassing the cache for each analysis on the dashboard to see if that helps? If not do this for each analysis:

1)Go to Advanced tab of Report
2)Go to Advance SQL section
3)Check the ‘Bypass Oracle BI Presentation Services Cache’ check box
4)Go to Prefix Section
5)Write the below command:
SET VARIABLE DISABLE_CACHE_HIT=1;
-make sure before saving click Apply SQL Query Button in the bottom
6)Save the report

And then see if James’s code works for you.

Anas

17-Jan-2017 at 2:39 pm

Great idea, Thanks it’s worked for me

Eduard R.

16-Feb-2017 at 8:58 am

Hi all!
It seems this is gouig to be usefull for our real-time visualization dashboards.
It is true that obiee is not well prepared to do that, but being creative that platform lets you to improve and achieve your goals.

Thanks James, very useful post

Dani

22-Jun-2017 at 11:34 am

This is very useful, but I have a problem, the first time I load the page works fine but the next times it accelerates and refreshes every 1 or 2 seconds, even if you put 30 seconds.

OBIEE 11.1.1.9

sorry for my english.

    James Coyle

    22-Jun-2017 at 11:40 am

    Hi Dami,

    It’s working well for me – can you debug to see if any JS errors are produced?

      Dani

      22-Jun-2017 at 11:52 am

      Hi, thanks for your support, yes there are a JS error.

      TypeError: document.getElementById(…) is null
      timerTick
      startRefreshTimer/refreshTimerObject

      I’m using Firefox 54

Ben Stone

29-Jun-2017 at 4:15 pm

Some of our Authors have added this code to their team’s dashboards and it is working to refresh the dashboards but it is not closing the “old” sessions so we’re getting too many sessions left open. Eventually this is causing errors. Any ideas on how to tweak this to ensure old session is closed on refresh?

Paul

23-Jul-2017 at 6:52 pm

James ,
Does this code works for obiee 11.1.1.7 version ?
I see it is not more refreshing the page / reports because internally there is no query processing in the lof after refresh timeout . Admin log should show new query with Bypass NQS Query Cache and Disable Caceh (in Advanced XML) section .
thanks

    James Coyle

    24-Jul-2017 at 8:11 am

    Yes, works fine on 11.1.1.7 but not on 12.

DEBASHIS PAUL

23-Jul-2017 at 7:14 pm

Also I am using Chrome … I am seeing in OBIEE 12c its working but refreshing only conditional reports and prompts … Not sure why it is not picking up dashboard reports which placed under same section this code in Dashboard layout ? Any special placing of this code around dashboard layout ?

this is excellent code but if that works in all browser version plus obiee that would be excellent.
Appreciate your help.

thanks

Leave a Reply

Visit our advertisers

Search

Quick Poll

Do you use GlusterFS in your workplace?

Visit our advertisers