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

Skip Navigation Links.

Report.WriteText3 Method

The WriteText3 method is very similar to the Write3, except all three parameters are HTML encoded. Again, WriteText3 does nothing if the middle parameter is empty. The WriteText3 method is sometimes called a "sandwich method" because the first and last parameter are written only when the middle parameter is non-empty.


Report.WriteText3 str1, str2 [, str3]

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

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


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

Use of this method is when you need to output 3 text parameters when the middle parameter is not empty. You can use this method if you know the parameters 1 and 3 do not have any special HTML tags such as:

Report.WriteText3 "(birth: ",, ")"

The following example is an incorrect use of the WriteText3 because the third parameter is an HTML tag, unless if you want to explicitly output "<br />" to the report. If you need to output the HTML break, use WriteText3Br.

Report.WriteText3 "Date of Birth: ",, "<br />"
Report.WriteText3 "Middle Name: <b>",, "</b><br />"

A correct use would be the following:

Report.WriteText3Br "Date of Birth: ",
Report.WriteT3 "Middle Name: <b>",, "</b><br />"

The method WriteT3 is a crossbreed of Write3 and WriteText3.

See Also:



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