with frmForm do begin for i := 0 to ComponentCount - 1 do begin if (Components[i] is Tfastreport) then j:=j+1;end; result:=j; end; end;