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.