Display em-dash in report

1.2k Views Asked by At

I want a simple formula which concatenates two values together separated by an em-dash. The formula would read something like the following:

{?PeriodFrom} & #em-dash-character# & {?PeriodTo}

Obviously, I just want the em-dash character to appear between the two period values. How can this be done?

2

There are 2 best solutions below

2
On BEST ANSWER

You can use ― U+2015 Horizontal Bar

enter image description here

You also don't need to use a formula for this. If you create a Text Object you can actually drag
{?PeriodFrom} and {?PeriodTo} into the textbox and paste the Horizontal Bar between them:

enter image description here

Just keep in mind you have to drag the parameter fields into
the textbox. Manually typing in "{?PeriodFrom}" won't work.

3
On

Also found this:

Four ways to insert an em dash in a Word document
The easiest way to enter an em dash ( — ) is to let Word do it.  Simply enter two hyphen characters between the two words you want to connect, and Word will turn the hyphens into an em dash. If this doesn't work for you, one of two possibilities exist:
•   You've inserted space characters between the words and the hyphen characters. When you enter spaces between the hyphens, Word formats the hyphens as an en dash ( – ), which is shorter than an em dash.
•   Someone has disabled the AutoCorrect option that formats hyphens as an em dash.
Now, this default won't work for everyone every single time. If you occasionally need two hyphens instead of an em dash, you can press [Ctrl]+Z and Word willundo the em dash character and restore the hyphens. If you find yourself doing this a lot, it might be more efficient to disable the AutoCorrect option and enter an em dash, when you require it, manually. You can disable this option as follows:
1.  From the Tools menu, choose AutoCorrect Options.
2.  Click the AutoFormat As You Type tab.
3.  Uncheck the Hyphens ( — ) With ( — ) option. 
4.  Click OK.
After disabling the AutoCorrect option, you'll have to enter an em dash manually. Fortunately, there are three easy methods:
•   Press [Ctrl]+[Alt]+-. You must use the minus sign (-) on the numeric keypad; if you use the hyphen character on the alphanumeric keypad, Word will change the cursor.
•   Hold down the [Alt] key and type 0151 on the numeric keypad.
•   Choose Symbol from the Insert menu, click the Special Characters tab, highlight the em dash, and click Insert.

formatted nicely here