Crystal reports 将同一列的多行合并为一行
我的数据库中有以下数据:Crystal reports 将同一列的多行合并为一行,crystal-reports,Crystal Reports,我的数据库中有以下数据: +------+-----------+-------------+---------------+ | ID | SomeValue | SomeDate | SomeOtherDate | +------+-----------+-------------+---------------+ | 123 | 12345 | 01.01.2017 | 01.01.2018 | | 123 | 54321 | 01.01.2017
+------+-----------+-------------+---------------+
| ID | SomeValue | SomeDate | SomeOtherDate |
+------+-----------+-------------+---------------+
| 123 | 12345 | 01.01.2017 | 01.01.2018 |
| 123 | 54321 | 01.01.2017 | 01.01.2019 |
| 123 | 25314 | 01.01.2017 | 01.01.2020 |
+------+-----------+-------------+---------------+
我希望Crystal Reports采用以下格式:
+------+---------------+---------------+---------------+
| ID | SomeValue2018 | SomeValue2019 | SomeValue2020 |
+------+---------------+---------------+---------------+
| 123 | 12345 | 54321 | 25314 |
+------+---------------+---------------+---------------+
如果可能的话,我该怎么做?我试过多个例子,但似乎无法奏效。我成功地制作了标题。很难让Crystal Reports水平评估内容。整个系统设计用于垂直评估。(报告顶部的内容在其下方的内容之前进行评估。) 但是,您可能会得到一个交叉表来执行此操作。首先,您需要为列创建一个新的Forumla字段。它的结构类似于:
"SomeValue" + Year({@SomeOtherDate})
设计交叉表时,您需要将ID
设置为行,将上面的新公式设置为列,汇总字段将为SomeValue
。您还需要在“自定义”样式中抑制总计