GenoPro Home

Skip Navigation Links.

Report.Write3 Method

The Write3 method has three parameters. If the middle parameter is empty, then the method Write3 does nothing, otherwise the three parameters are written to the output stream. The Write3 method is sometimes called a "sandwich method" because the first and last parameter are written only when the middle parameter is non-empty.


Report.Write3 str1, str2 [, str3]

In summary, the Write3 method is the equivalent of the following piece of code:

If (str2 <> "") Then
	Report.Write str1 & str2 & str3
End If


If (str2 <> "") Then
	Report.Write str1
	Report.Write str2
	Report.Write str3
End If

Use of this method is when you want to insert text before and after a value. For instance, if before writing the year of birth to the report, you may want to display some text such as "Year of Birth: "

Report.Write3 "Year of Birth: ",, "<br />"

The Write3 method is useful to wrap a value with HTML tags. For instance, if you want to write the year of birth in bold, you can do the following:

Report.Write3 "Year of Birth: <b>",, "</b><br />"


Report.Write3 "Permanent ID: ",	' The permanent ID cannot have special HTML characters.
Report.Write3 "Number of Children: ", i.children.count

Similar to the Write method, none of the three parameters are encoded by the Write3 method. As a result, you cannot use the Write3 method to output text. You can safely use the Write3 method to output simple values such numbers or "text values" you are certain could never have any special HTML characters. Use the WriteT3 method if you are not sure and/or need to output a text value.

See Also:


