GenoPro Home
GenoPro Home  |  SDK Home  |  Report Generator  |  Support  |  Search  |  Help  |  Site Map

Skip Navigation Links.

Report.WritePicture Method

The WritePicture method write the HTML code to include a picture to the report. The generated code does look like this:

<a href="picture.jpg"><img src="picture.jpg" width="143" height="250" border=0 align=right alt="Picture Name"/></a>

Two optional parameters are available; one to specify the aspect ratio, and the other to specify any attributes such as the border and the alignment. The aspect ratio is to limit the size of the image, otherwise the picture will be displayed in its full size. The attributes are any HTML attributes for the img tag. Those attributes may be the style, border, alignment, name, id, or any other attribute allowed for the img tag.

Report.WritePicture oPicture [, strAspectRatio [, strAttributes]]

If the object oPicture is not a picture object, then the method WritePicture will attempt to retrieve the primary picture from that object. For instance, if the object is an individual or a family, the WritePicture method will generate the HTML code for that picture. The WritePicture does nothing if the picture does not exist, or the object does not have a primary picture.

Use the WritePicture method wherever you want to include a picture to the report. The WritePicture method will generate the appropriate HTML code and will also queue the picture file to be copied (or linked) to the destination report according to the PathPictures from the configuration file.

Report.WritePicture i.Pictures.Primary, "250x250", "border=0 align=right"
Report.WritePicture f		' Write the primary picture of the family

Unicode Issues:
The values for href and src attributes are encoded using the Util.HrefEncode method, so any Unicode characters found in the filename is safely encoded. The alt text is HTML encoded using the Util.HtmlEncode method.

See Also:



Copyright ┬ę 1998-2024. All rights reserved. GenoPro┬« and the GenoPro logo are registered trademarks.