what ajax function to call for reloading the report viewer?

Stimulsoft Reports.WEB discussion
Post Reply
bobsov
Posts: 115
Joined: Sun Jan 27, 2013 12:10 am

what ajax function to call for reloading the report viewer?

Post by bobsov »

I have a unique requirement where I need to do auto-refresh for the mobile version of report viewer page. As I have other items in the page itself, I don't want to page reload but rather call ajax functionality to reload the viewer at a set interval. what function should I be calling to make this happen in javascript?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: what ajax function to call for reloading the report view

Post by Vladimir »

Hello,

Please specify which component you are using: MobileViewer or MvcMobileViewer?

Thank you.
bobsov
Posts: 115
Joined: Sun Jan 27, 2013 12:10 am

Re: what ajax function to call for reloading the report view

Post by bobsov »

Mobile viewer
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: what ajax function to call for reloading the report view

Post by Vladimir »

Hello,

Unfortunately, at the moment there is no specific method for Mobile Viewer, we will try to prepare a solution for you. We need some time.

Thank you.
bobsov
Posts: 115
Joined: Sun Jan 27, 2013 12:10 am

Re: what ajax function to call for reloading the report view

Post by bobsov »

Thanks Vladimir. I will wait for this solution.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: what ajax function to call for reloading the report view

Post by HighAley »

Hello.

Let us know if you will need any additional help.

Thank you.
bobsov
Posts: 115
Joined: Sun Jan 27, 2013 12:10 am

Re: what ajax function to call for reloading the report view

Post by bobsov »

I was able to call ajax refresh every 10 seconds doing some digging in codes.

Here is the code on my main page that did the trick.

Code: Select all

var autorun = self.setInterval(function() {
		var button = document.getElementById("StiMobileViewer1_Submit");
		button.action();
	}, 10000);
May be there is a better a solution but this works great.
bobsov
Posts: 115
Joined: Sun Jan 27, 2013 12:10 am

Re: what ajax function to call for reloading the report view

Post by bobsov »

Also with slight modification in source code( StiMobileViewer.cs), I was able to make this work for reports that do not have parameters.

Cheers!!!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: what ajax function to call for reloading the report view

Post by HighAley »

Hello.

We are very great to work with such customers.

Thank you for using our product.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: what ajax function to call for reloading the report view

Post by Vladimir »

Hello,

Alternatively, you can use the following code:

Code: Select all

setTimeout("jsStiMobileViewer1.sendToServer('NavigationReport')", 10000);
StiMobileViewer1 - Mobile Viewer ID.


Thank you.
Post Reply