No announcement yet.

Variables in labels and line breaks

  • Filter
  • Time
  • Show
Clear All
new posts

  • Variables in labels and line breaks

    Normally column labels can be broken into lines by applying the | (bar) in the label text.

    LABEL statements can contain variable names likelabel col1=”!varA” where varA is a variable name from the data set.

    How do you break the text for labels like this?

    Let’s suppose the variable varA value equals “It is a long text” and you want to break this text into two lines for the column label. You can NOT put line breaks (|) into the variable value text because it will still be part of the variable value and will not act as a break. The break has to be placed into the LABEL statement.

    The way to accomplish this is to create two variables from the one you want to break up:

    varA1=”It is a” and varA2=”long text”.

    The label statement will be:LABEL col1=”!varA1 | !varA2”.