Using Expressions for Labeling
Often it is desirable to create a label for an object with
information that is contained in multiple columns. The
best way to achieve this functionality is to create an
expression that defines the label.
1.To create an expression, choose MAP > LAYER
CONTROL>LABEL. In the Label With section, select
Expression from the Label with pull down. At this point
you are ready to enter your expression.
following examples are based on the CUST browser that is
You would substitute the names of your columns in place of
the column names in the examples.
3.A string constant can be added to a column's contents to
clarify the meaning of a label. The string constant must
be contained by quotation marks. A plus sign is used to
concatenate the text objects. EXPRESSION: "Total Sales:
"+Amount This example will print the words "Total Sales"
and a colon and the value in the Amount column
4.A multiple line label can be created by adding a
carriage return to the expression at the point where you
want the next line to begin. The carriage return is
represented as CHR$(13) in an expression.
This example will print the name value with the amount
value directly under it.
5.The two techniques above can be combined to form very
EXPRESSION: "Name: "+Name+chr$(13)+" Sales: "+Amount
This example demonstrates one method of combining plus
signs and carriage returns in an expression.
information about creating expressions can be found in the
MapInfo Reference Manual, Appendix E: Creating
Expressions, pages 377 to 402