Not long back I came to know SAS has made auto-refresh easy in their latest version 7.x. Before I used to do auto-refresh either using Chrome Plugin or other tools like AutoHotKey script. So here we can how to do auto-refresh in SAS VA without using any external application.
You can do it with guest account if enabled or normal user account. So open the report and click on File -> Email. You can do it only if you open the URL that has Banner. Below will be the base url that gives banner and the others don't:
Here are the base URLs:
With Banner
http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer.jsp?
For Guest Access
http://<server>:<port>/SASVisualAnalyticsViewer/guest.jsp?
Without Banner
http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer.jsp?reportViewOnly=true&
For Guest Access
http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer_guest.jsp?
Now open the URL and do File -> Email. You will get the actual URL which open the report.
Now click on the link that is given in the screenshot, it will open in your browser. Copy the link in your browser and use it in the following html code.
----------------------------------------------------------------------
So just replace the link you got from email after OpenInNewTab().
You can do it with guest account if enabled or normal user account. So open the report and click on File -> Email. You can do it only if you open the URL that has Banner. Below will be the base url that gives banner and the others don't:
Here are the base URLs:
With Banner
http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer.jsp?
For Guest Access
http://<server>:<port>/SASVisualAnalyticsViewer/guest.jsp?
Without Banner
http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer.jsp?reportViewOnly=true&
For Guest Access
http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer_guest.jsp?
Now open the URL and do File -> Email. You will get the actual URL which open the report.
Now click on the link that is given in the screenshot, it will open in your browser. Copy the link in your browser and use it in the following html code.
HTML code to autorefresh:
----------------------------------------------------------------------------------
<HTML>
<BODY onload=OpenInNewTab('http://XXXXXXXXXXXXXXX/SASVisualAnalyticsViewer/VisualAnalyticsViewer_guest.jsp?saspfs_request_backurl_list=http%3A%2F%2Fsa01XXXXXXXXXX%2FSASVisualAnalyticsHub&saspfs_request_backlabel_list=Home&saspfs_request_path_url=SBIP%3A%2F%2FMETASERVER%2FUser+Folders%2Fsasdemo%2FMy+Folder%2FMonitoring+Sales+Fin+Report%28Report%29&saspfs_request_entitykey=A5PVO8XD.AY00000T%2FTransformation&_vaSectionName=vi1')>
</BODY>
<STYLE>
body {
background-color: black;
}
</STYLE>
<SCRIPT>
var minInterval = setInterval(minTimer, 60000);
var hourInterval
var refreshURL;
var win;
function minTimer() {
var d = new Date();
if(d.getMinutes() == 55) {
console.log("Refresh");
clearInterval(minInterval);
win.location.href=refreshURL;
hourInterval = setInterval(hourTimer, 3600000);
}
}
function hourTimer() {
console.log("Refresh");
win.location.href=refreshURL;
}
function OpenInNewTab(url) {
win = window.open(url, '_blank');
refreshURL = url;
win.focus();
}
</SCRIPT>
</HTML>
So just replace the link you got from email after OpenInNewTab().
Comments
Post a Comment