export button shows many duplicate formats?

hsmhsm
edited 5:30PM in FastReport 4.0
I use the 'export' button on my reports. However when I show a report and click the export button I see six duplicate formats for export. (ie the selection looks like the list below).
My reports are pretty standard using a different form for each report, each with its own FR component except for one form that also holds a MSExcel export component, a PDF export component and a RTF export component. That seemed enough to put the exoprt and pdf buttons on every report (but no RTF button).

Why am I getting these duplicates and how should I do things to just get three buttons, one fopr excel, one for RTF and one for PDF?
Howard

PDF File...
RTF File...
Excel Table (OLE)...
PDF File...
RTF File...
Excel Table (OLE)...
PDF File...
RTF File...
Excel Table (OLE)...
PDF File...
RTF File...
Excel Table (OLE)...
PDF File...
RTF File...
Excel Table (OLE)...
PDF File...
RTF File...
Excel Table (OLE)...

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 5:30PM
    don't keep adding export components.
  • hsmhsm
    edited 5:30PM
    gordk wrote: »
    don't keep adding export components.

    Sorry for the delay but I have been away and only just seen this reply.

    I don't understand though, what mustn't I keep adding?

    I have about 12 reports, each on its own form. One form (only one) also has a pdf export component and an excel export component, that's all I have, no other components on any of the forms expept for a report component. If I am not meant to put these two export components onto a form then what are they for?

    I haven't put any Word /RTF export components on any forms but I still get these appearing multiple times in the drop down list under the 'export' button (which seems to appear by default).
    Howard
  • gordkgordk St.Catherines On. Canada.
    edited 5:30PM
    don't keep adding export components either from the tool palette or by creating in code. or you will see duplicates.
    they are global to the preview.
  • edited 5:30PM
    I have a form where I put all the export components, then I include the form on other forms where I have report components.

    IOW, have the export component in one place only, sort of inherit them on other forms, not on every form with a report component.
  • edited 5:30PM
    fix at file frxdsgnintf.pas

    procedure TfrxExportFilterCollection.Register(Filter: TfrxCustomExportFilter);
    var
    i: Integer;
    Item: TfrxExportFilterItem;
    begin
    if Filter = nil then Exit;
    for i := 0 to Count - 1 do
    if Items.Filter.ClassName = Filter.ClassName then // HERE ADD .CLASSNAME
    Exit;

    Item := TfrxExportFilterItem(Add);
    Item.Filter := Filter;
    end;

    THANKS to iwancs, to fix my problem too

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.