Most of the articles in this section of the Knowledge Base focus on using the Text Format tool, but the Text Format tool does have one drawback, which this article intends to remedy.
While the Text Format tool is beneficial in formatting an entire text object, it cannot format individual values within expressions. When formatting individual values within a text object is necessary, it is recommended to use the string.Format method. The string.Format method provides most of the same formatting options as the Text Format tool, but the string.Format method provides even more flexibility.
To use the string.Format method in a text component, select the text component for editing, and enter the expression in the text field.
As an example, when the need to format a value as currency arises, use the C specifier:
In the case that Value is 100.00, then after formatting, the line prints as:
Formatting more than one parameter is permissible with the string.Format method.
For more information about string.Format , see String.Format Method.