Disabling Preview Functions
Posted: Thu Apr 10, 2008 8:40 am
Hi Stimulsoft.
I'd like to disable a number of preview functions depending on if a certain flag is true or false. I would like them disabled from the Preview window as well as from the preview tab in the designer.
Currently I have tried the following:
This works in that the buttons no longer appear as visible but for the clever users who press Ctrl+P or Ctrl+S this seems to still bring up the print dialog and the save dialog.
Is there a way I can disbale this from happening or am I using the wrong service or procedure.
Regards,
Brendan.
I'd like to disable a number of preview functions depending on if a certain flag is true or false. I would like them disabled from the Preview window as well as from the preview tab in the designer.
Currently I have tried the following:
Code: Select all
bool allow = false;
StiService service = Stimulsoft.Report.StiConfig.Services.GetService(typeof(StiPreviewConfigService));
if (service != null)
{
StiPreviewConfigService previewService = service as StiPreviewConfigService;
previewService.ExportEnabled = allow;
previewService.PrintEnabled = allow;
previewService.SaveEnabled = allow;
previewService.SendEMailEnabled = allow;
}
Is there a way I can disbale this from happening or am I using the wrong service or procedure.
Regards,
Brendan.