Disabling Preview Functions

Stimulsoft Reports.NET discussion
Post Reply
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Disabling Preview Functions

Post by Brendan »

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:

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;
}
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.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Disabling Preview Functions

Post by Vital »

Hello Brendan,

Its a bug. We have fixed it. Patch will be included in build from 14 April.

Thank you.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Disabling Preview Functions

Post by Brendan »

Thanks Vital.
Post Reply