Page 1 of 2
Dashboard viewer disable buttons
Posted: Thu May 02, 2019 6:34 pm
by ddsmith99301
How do I disable the edit and open buttons on the StiDashboardViewerControl? I don't want users to be able to edit the dashboard from the viewer screen.
Re: Dashboard viewer disable buttons
Posted: Fri May 03, 2019 5:44 pm
by Lech Kulikowski
Hello,
You can set it in the PreviewSettings for the report.
Thank you.
Re: Dashboard viewer disable buttons
Posted: Wed May 22, 2019 8:23 pm
by ddsmith99301
I have tried everything with the report.PreviewSettings including setting it to 0 without success. Here is a segment of my code.
Dim report As StiReport = New StiReport()
report.Load(strFileName)
.
.
.
If report.PreviewSettings And CInt(Stimulsoft.Report.Viewer.StiPreviewSettings.Editor) = CInt(Stimulsoft.Report.Viewer.StiPreviewSettings.Editor) Then
report.PreviewSettings = report.PreviewSettings And CInt(Not Stimulsoft.Report.Viewer.StiPreviewSettings.Editor)
End If
.
.
.
ViewerControl = New StiDashboardViewerControl(report)
Re: Dashboard viewer disable buttons
Posted: Thu May 23, 2019 6:37 pm
by ddsmith99301
Lech Kulikowski wrote: ↑Fri May 03, 2019 5:44 pm
Hello,
You can set it in the PreviewSettings for the report.
Thank you.
PLEASE someone answer this. I need help with this.
I have tried everything with the report.PreviewSettings including setting it to 0 without success. Here is a segment of my code.
Dim report As StiReport = New StiReport()
report.Load(strFileName)
.
.
.
If report.PreviewSettings And CInt(Stimulsoft.Report.Viewer.StiPreviewSettings.Editor) = CInt(Stimulsoft.Report.Viewer.StiPreviewSettings.Editor) Then
report.PreviewSettings = report.PreviewSettings And CInt(Not Stimulsoft.Report.Viewer.StiPreviewSettings.Editor)
End If
.
.
.
ViewerControl = New StiDashboardViewerControl(report)
Re: Dashboard viewer disable buttons
Posted: Fri May 24, 2019 6:13 pm
by ddsmith99301
I really need documentaion for the StiDashboardViewerControl.
Re: Dashboard viewer disable buttons
Posted: Fri May 24, 2019 9:04 pm
by ddsmith99301
Lech Kulikowski wrote: ↑Fri May 03, 2019 5:44 pm
Hello,
You can set it in the PreviewSettings for the report.
Thank you.
Is it possible that you could expose the properties
StiDashboardViewerControl.buttonEditDashboard
and StiDashboardViewerControl.buttonOpenDashboard?
It appears they are currently 'protected'.
I believe this would give the option to disable the edit and open buttons on the dashboard viewer so the users would not be able to edit or open another dashboard. I need to have control of those with code that restricts the user to only the dashboard they are working on.
.
- 2019-05-24_1400.png (41.51 KiB) Viewed 6639 times
Re: Dashboard viewer disable buttons
Posted: Mon May 27, 2019 8:07 am
by Lech Kulikowski
Hello,
Please check the following code:
Code: Select all
var report = StiReport.CreateNewDashboard();
report.DashboardViewerSettings = StiDashboardViewerSettings.None;
Thank you.
Re: Dashboard viewer disable buttons
Posted: Mon May 27, 2019 4:30 pm
by ddsmith99301
Thank you! Is there a way to show some of the buttons, but not all?
If I use this code it still shows all of the buttons.
var report = StiReport.CreateNewDashboard();
report.DashboardViewerSettings = StiDashboardViewerSettings.ShowRefreshButton;
Re: Dashboard viewer disable buttons
Posted: Tue May 28, 2019 8:14 am
by Lech Kulikowski
Hello,
Please check the following code:
report.DashboardViewerSettings = (StiDashboardViewerSettings.ShowToolBar | StiDashboardViewerSettings.ShowRefreshButton);
Thank you.
Re: Dashboard viewer disable buttons
Posted: Tue May 28, 2019 6:16 pm
by ddsmith99301
Lech Kulikowski wrote: ↑Tue May 28, 2019 8:14 am
Hello,
Please check the following code:
report.DashboardViewerSettings = (StiDashboardViewerSettings.ShowToolBar | StiDashboardViewerSettings.ShowRefreshButton);
Thank you.
Thank you so much. That works well.
In vb.net:
report.DashboardViewerSettings = (StiDashboardViewerSettings.ShowToolBar Or StiDashboardViewerSettings.ShowRefreshButton)