showing the next dashboard in a report with code

Stimulsoft Dashboards.WIN discussion
Post Reply
joris.wils
Posts: 11
Joined: Tue May 26, 2020 1:56 pm

showing the next dashboard in a report with code

Post by joris.wils »

Hi
I have a report that has 2 dashboard-pages in it.
I would like to alternate between those two in a viewercontrol by using a timer.
How could I do this in c#?
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: showing the next dashboard in a report with code

Post by Lech Kulikowski »

Hello,

Please check the following code:
//where jsStiWebViewer1 - "js" + Viewer ID
jsStiWebViewer1.onready = function () {
var pageNumber = 0;
setInterval(function () {
pageNumber = pageNumber == 0 ? 1 : 0;
jsStiWebViewer1.reportParams.pageNumber = pageNumber;
jsStiWebViewer1.controls.dashboardsPanel.buttons[pageNumber].select();
jsStiWebViewer1.postAction("Refresh");
}, 10000);
}

Thank you.
joris.wils
Posts: 11
Joined: Tue May 26, 2020 1:56 pm

Re: showing the next dashboard in a report with code

Post by joris.wils »

stiDashboardViewerControl1.reportParams
and
stiDashboardViewerControl1.controls.dashboardsPanel.button
don't seem to exist. Any other way I can do this?
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: showing the next dashboard in a report with code

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: showing the next dashboard in a report with code

Post by HighAley »

Hello,

Please, check the name of the Viewer.
It seems that you should replace it with the right ID.

Thank you.
joris.wils
Posts: 11
Joined: Tue May 26, 2020 1:56 pm

Re: showing the next dashboard in a report with code

Post by joris.wils »

I'm sorry, but I'm not using the javascript-viewer.
I'm using the dashboard viewer in a winforms application.

Or am I missing something?
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: showing the next dashboard in a report with code

Post by Lech Kulikowski »

Hello,

Unfortunately, at the current moment, it is not possible in winforms.

Thank you.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: showing the next dashboard in a report with code

Post by Lech Kulikowski »

Hello,

As a way, you can split pages in dashboards into separate templates and by timer load necessary dashboard and refresh the viewer.

Thank yuo.
Post Reply