Dashboard viewer disable buttons
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Dashboard viewer disable buttons
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.
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Dashboard viewer disable buttons
Hello,
You can set it in the PreviewSettings for the report.
Thank you.
You can set it in the PreviewSettings for the report.
Thank you.
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Re: Dashboard viewer disable buttons
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)
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)
- Attachments
-
- 2019-05-22_1317.png (19.4 KiB) Viewed 6582 times
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Re: Dashboard viewer disable buttons
PLEASE someone answer this. I need help with this.Lech Kulikowski wrote: ↑Fri May 03, 2019 5:44 pm Hello,
You can set it in the PreviewSettings for the report.
Thank you.
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)
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Re: Dashboard viewer disable buttons
I really need documentaion for the StiDashboardViewerControl.
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Re: Dashboard viewer disable buttons
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.
.
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Dashboard viewer disable buttons
Hello,
Please check the following code:
Thank you.
Please check the following code:
Code: Select all
var report = StiReport.CreateNewDashboard();
report.DashboardViewerSettings = StiDashboardViewerSettings.None;
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Re: Dashboard viewer disable buttons
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;
If I use this code it still shows all of the buttons.
var report = StiReport.CreateNewDashboard();
report.DashboardViewerSettings = StiDashboardViewerSettings.ShowRefreshButton;
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Dashboard viewer disable buttons
Hello,
Please check the following code:
report.DashboardViewerSettings = (StiDashboardViewerSettings.ShowToolBar | StiDashboardViewerSettings.ShowRefreshButton);
Thank you.
Please check the following code:
report.DashboardViewerSettings = (StiDashboardViewerSettings.ShowToolBar | StiDashboardViewerSettings.ShowRefreshButton);
Thank you.
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Re: Dashboard viewer disable buttons
Thank you so much. That works well.Lech Kulikowski wrote: ↑Tue May 28, 2019 8:14 am Hello,
Please check the following code:
report.DashboardViewerSettings = (StiDashboardViewerSettings.ShowToolBar | StiDashboardViewerSettings.ShowRefreshButton);
Thank you.
In vb.net:
report.DashboardViewerSettings = (StiDashboardViewerSettings.ShowToolBar Or StiDashboardViewerSettings.ShowRefreshButton)