在报告中显示em-dash

时间:2016-08-09 10:15:57

标签: crystal-reports crystal-reports-2013

我想要一个简单的公式,将两个值连接在一起,用em-dash分隔。该公式将如下所示:

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

显然,我只是希望em-dash字符出现在两个周期值之间。怎么办呢?

2 个答案:

答案 0 :(得分:0)

您可以使用 - U+2015 Horizontal Bar

enter image description here

需要使用公式。如果你创建了一个文本对象,你实际上可以将{?PeriodFrom}{?PeriodTo}拖到文本框中并在它们之间粘贴水平条:

enter image description here

请记住,您必须将参数字段拖到文本框中。手动输入“{?PeriodFrom}”将无效。

答案 1 :(得分:0)

还发现了这个:

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