export button shows many duplicate formats?
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)...
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
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
they are global to the preview.
IOW, have the export component in one place only, sort of inherit them on other forms, not on every form with a report component.
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