New Line Characters in Data Calculations in Text Controls

New Line Characters in Data Calculations

 

Summary

Sometimes data calculations may require new line characters or carriage returns to achieve the desired formatting result.

Cause

ASCII equivalent decimal values must be provided in order for the data calculation to work.

Solution

To insert line feeds or carriage returns within a data calculation, use the ASCII equivalent of the decimal value. The values below provide the desired output:

  • New Line Feed: convert(10, System.Char)
  • Carriage Return: convert(13, System.Char)

The following example illustrates how the values can be used in a Data Calculation field of a control.

 

Data Calculation:

 

‘THIS’ + convert(10, System.Char) + ‘IS A’ + convert(10, System.Char) + ‘TEST’

 

Output:

THIS

 IS A

TEST

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk