Jump to content
We've recently updated our Privacy Statement, available here ×

How to reload a jasper report repeatedly within every one minute


prabuddha.kulatunga
Go to solution Solved by prabuddha.kulatunga,

Recommended Posts

I use a jasper report as my dashboard on Jasper Server 6.4.2 version.on that report, I have to display current time with live updates without reloading the report manually. I tried to schedule the report and set as output options as Overwrite Files and it's not worked.

Basically,I want to reload a report when it already opened and displayed withing every given time period repeatedly until I close the report. How can I do this?

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

Found a way by myself.

Go to ViewReport.jsp on jasper server installation files.

Then add below code for it.(Actually we use java script to do this.)

 <script type="text/javascript">
     var url = window.location.href; //take current tab url
     var dash = 'http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=%2FMy_Reports&reportUnit=%2FMy_Reports%2FDashboard_Report_Original__2_&standAlone=true';
     
     if(url == dash ){
        setTimeout(function(){
            window.location.reload(1);
        }, 5000);
     }
</script>

url is the current display report url.

dash is the url that we want to refresh. otherwise all the reports will be refresh withn every 5seconds.

5000 is time gap want to refresh.

restart the jasper server.

that's it..

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...