function out=execute(c)
%EXECUTE generates report contents

%   Copyright (c) 1997-2000 by The MathWorks, Inc.
%   $Revision: 1.4 $  $Date: 2000/03/23 19:35:54 $
out = [];
compInfo = getInfo( c );
if ~rgsf( 'is_parent_valid', c )
		[validity, errMsg] = rgsf( 'is_parent_valid', c );
		status(c, sprintf('%s error: this component %s',compInfo.Name, errMsg) ,1);
	return;
end

rptgenSF = zsfmethods;
parentClass = rgsf( 'get_parent_class', c );
if strcmp( parentClass, 'csf_chart_loop' )
   id = rptgenSF.chartLoop.id;
else
   id = rptgenSF.currentObject.id;
end


if ~ismember( id, rptgenSF.linkTargetCreated )
	linkObj=c.rptcomponent.comps.cfrlink;

	linkObj.att.LinkType='Anchor';
   linkObj.att.LinkID=sf( 'get', id, '.rgTag' );
	linkObj.att.LinkText=c.att.LinkText;

	out=runcomponent(linkObj,0);
   rptgenSF.linkTargetCreated = [id, rptgenSF.linkTargetCreated];
else
   wrnMsg = 'Warning: link target for this component already exists ';
   status(c, [compInfo.Name, wrnMsg] ,2);
end