This line or output element renders a barcode in various formats.
<Line>
<Barcode value="expression..." ... />
</Line>
The Barcode does not have child nodes,
only attributes.
Note that Expressions in attribute
settings below depend on the parent node context.
Some may only use constant expressions or query column
references from Independent queries.
Child nodes of <Output> nodes in
<Report> context may also
use report query column references.
<Barcode> elements
in <Output> may be
suppressed.
<Line>
<Barcode suppress="yes" ... />
</Line>
Default value is false,
i.e. no suppression.
The expression for suppress
must be a constant expression. An environment
variable (since it can't - or shouldn't - change
during the report execution) is considered
constant. See Expressions.
The string value to be encoded as barcode.
<Line>
<Barcode value="'1234567890128'" />
</Line>
The value is parsed as an expression
from the value attribute.
See Expressions.
This setting indicates whether the value is "precalculated", i.e. the value for the last row in the data set is used, or it would be the actual value for the current row in the data set.
<Barcode delayed="yes" /> <Barcode precalculate="yes" />
Default is false.
This setting is only applicable for
line elements in the
Output node node in
<ReportHeader>,
<ReportFooter>,
<Fieldheaders>
<FieldDetails>,
since they are the ones under the
<Report> scope
with a query.
The format string is used to format the
value to be displayed
in the generated output. For example, to
print a number with two decimal places:
<Barcode value="'123456789012'" type="'ean-13'" />
The type may be optional, in which
case it's autodetected and the barcode
is rendered in the format that first
allows the value string
to be rendered. Possible types (in the order of
autodetection) are:
upc-a,
ean-13,
upc-e,
ean-8,
isbn,
code39,
code39ext,
code128b,
code128c, or
code128.
If type is specified,
the value is
rendered in that barcode type if
the string is valid for the type.
If the value is invalid
for the specified type,
or autodetection fails, because the
value is invalid
for any of the above listed types,
the barcode is not rendered.
The field width.
<Barcode value="'...'" width="6" />
Default is unset, i.e. the field width is implicitly set to the rendered width (in points) of the barcode's inherent encoding width.
If set, the barcode is scaled to the specified width. Its unit depends on the Size unit attribute.
When the field is the last one in the
<Line> and its width
is unset, then depending on the remaining width
of the line, the barcode is either rendered as is,
or it's scaled to the remaining width.
When the Size unit attribute is set to
rlib, the field width is measured
in number of characters that is set for the
<Line>.
The field height.
<Barcode value="'...'" height="6" />
Default is unset, i.e. the barcode height is implicitly controlled by the text in the line or the font height set for the line.
If set, and it's larger than the text in the line,
the barcode height controls the line height, with
empty space added before and after the text elements
vertically. is scaled to the specified width.
It's measured in points, i.e. 1/72th
of an inch.
When the field is the last one in the
<Line> and its width
is unset, then depending on the remaining width
of the line, the barcode is either rendered as is
(if the remaining width is larger), or it's
scaled down to the remaining width.
This color is used to render the barcode's bars. It's accepted with both American and British spelling.
<Barcode color="'blue'"> <Barcode colour="'blue'">
Default is what's set for Line node,
otherwise black.
See Color specification.
This color is used to render the background (the "gaps") in the barcode. It's accepted with both American and British spelling.
<Barcode bgcolor="'blue'"> <Barcode bgcolour="'blue'">
Default is what's set for Line node,
otherwise white.
See Color specification.