how to disable export

Hi ! I want to disable (runtime) the export filters. Is this possible ? Thanks

Comments

  • gpigpi
    edited 4:04AM
    There are frxExportFilters() function in the frxDsgnIntf which returns a pointer of the export filters collection
    You can register/unregister required export filters:

    frxDsgnIntf.frxExportFilters.Register(frxXLSExport1); // You can don't call this if export filter was created in the design-time or by .Create(...) constructor

    frxDsgnIntf.frxExportFilters.UnRegister(frxXLSExport1);

    Note, UnRegister() calls a destructor of export filter's class, so you should create export filter to use it again
    Also you can create export filters what he need for each user
    procedure TForm1.FormClick(Sender: TObject);
    begin
      frxReport1.ShowReport();
    end;
    
    procedure TForm1.frxReport1BeginDoc(Sender: TObject);
    var i: integer;
        P: TPopupMenu;
    begin
      P := TfrxPreviewForm(frxReport1.PreviewForm).ExportPopup;
      for i := 0 to frxExportFilters.Count - 1 do
        P.Items[i].Visible := frxExportFilters[i].Filter = frxXLSExport1;
    end;
    

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.