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.
Syntax:
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
or
If (str2 <> "") Then
Report.Write Util.HtmlEncode(str1)
Report.Write Util.HtmlEncode(str2)
Report.Write Util.HtmlEncode(str3)
End If
Usage:
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: ", i.birth.date.year, ")"
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: ", i.birth.date, "<br />"
Report.WriteText3 "Middle Name: <b>", i.name.middle, "</b><br />"
A correct use would be the following:
Report.WriteText3Br "Date of Birth: ", i.birth.date
Report.WriteT3 "Middle Name: <b>", i.name.middle, "</b><br />"
The method WriteT3 is a crossbreed of
Write3
and WriteText3 .
See Also:
Write
Write3Br
Write3Br
WriteT3
WriteT3Br
WriteText3
WriteText3Br
|