Page 1 of 1

showing the next dashboard in a report with code

Posted: Wed Sep 16, 2020 2:26 pm
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#?

Re: showing the next dashboard in a report with code

Posted: Fri Sep 18, 2020 1:40 pm
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.

Re: showing the next dashboard in a report with code

Posted: Mon Sep 21, 2020 12:31 pm
by joris.wils
stiDashboardViewerControl1.reportParams
and
stiDashboardViewerControl1.controls.dashboardsPanel.button
don't seem to exist. Any other way I can do this?

Re: showing the next dashboard in a report with code

Posted: Wed Sep 23, 2020 6:26 pm
by Lech Kulikowski
Hello,

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

Thank you.

Re: showing the next dashboard in a report with code

Posted: Thu Sep 24, 2020 8:33 am
by HighAley
Hello,

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

Thank you.

Re: showing the next dashboard in a report with code

Posted: Fri Sep 25, 2020 11:55 am
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?

Re: showing the next dashboard in a report with code

Posted: Tue Sep 29, 2020 8:31 am
by Lech Kulikowski
Hello,

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

Thank you.

Re: showing the next dashboard in a report with code

Posted: Tue Sep 29, 2020 8:35 am
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.