User`s guide

13 Create a Report Program
13-74
Create an External Link
Use an mlreportgen.dom.ExternalLink object to create an external link, specifying
the link target and the link text.
import mlreportgen.dom.*
d = Document('mydoc');
append(d,ExternalLink('http://www.mathworks.com/','MathWorks'));
close(d);
rptview('mydoc','html');
Create an Internal Link
To set up links to a location in a report, append an mlreportgen.dom.InternalLink
object to the document or document element. Use an mlreportgen.dom.LinkTarget
object with the document element to link to. For example, you can include an About the
Author link to a section that has the heading Author’s Biography.
import mlreportgen.dom.*
d = Document('mydoc');
append(d,InternalLink('bio','About the Author'));
h = Heading(1,LinkTarget('bio'));
append(h,'Author''s Biography');
append(d,h);
close(d);
rptview('mydoc','html');
Add Text or Images to Links
To add text or an image to an ExternalLink or InternalLink object, use the append
method with that object. Append a Text, Image, or CustomElement object.
See Also
mlreportgen.dom.ExternalLink | mlreportgen.dom.ExternalLink.append |
mlreportgen.dom.InternalLink | mlreportgen.dom.LinkTarget