Disabling Save items in Preview

edited 6:21PM in FastReport .NET
I know how i can disable individual output items from save list in preview.

To disable csv output:
FastReport.Utils.RegisteredObjects.FindObject( typeOf( FastReport.Export.Csv.CSVExport ) ):Enabled := False;

But how can i disable the first item ("prepared report")?


Comments

  • edited 6:21PM
    Hello,

    A small hack needed:
          ButtonItem btnSave = previewControl1.ToolBar.Items[previewControl1.ToolBar.Items.IndexOf("btnSave")] as ButtonItem;
          btnSave.SubItems.RemoveAt(0);
    
  • edited 6:21PM
    AlexTZ wrote: »
    Hello,

    A small hack needed:
          ButtonItem btnSave = previewControl1.ToolBar.Items[previewControl1.ToolBar.Items.IndexOf("btnSave")] as ButtonItem;
          btnSave.SubItems.RemoveAt(0);
    

    Thank you
    But how can i use it?
    I use the base preview from the report and no additional PreviewControl. And the preview property from my report (Report.Preview) is NULL.
  • edited 6:21PM
    Sorry, it's for custom preview window only. You can't hide that item in the default preview window.
  • edited 6:21PM
    AlexTZ wrote: »
    Sorry, it's for custom preview window only. You can't hide that item in the default preview window.

    I have changed my source and use a custom preview window.
    Now the "hack" works. [img]style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> Thank you[/img]

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.