【发布时间】:2021-05-17 20:13:58
【问题描述】:
需要根据主组、问题选项卡、行和列 ID 将数据集中多行的值打印到详细信息中的单行。
寻找关于这在 SSRS 中是否可行的建议,可能使用嵌套表或查找/查找集/连接?
无法在数据库级别添加任何函数或过程,仅限于现有的数据集格式。
列 # 仅限于 1 或 2
数据集
| MainGroup | QuestionTab | QuestionRow | QuestionColumn | Question | Answer |
|-----------|-------------|-------------|----------------|-------------|-----------|
| Group1 | TabA | 1 | 1 | Question1 | Answer1 |
| Group1 | TabA | 1 | 2 | Question2 | Answer2 |
| Group1 | TabA | 2 | 1 | Question3 | Answer3 |
| Group1 | TabA | 2 | 2 | Question4 | Answer4 |
| Group1 | TabB | 1 | 1 | Question234 | Answer234 |
| Group1 | TabB | 2 | 1 | Question789 | Answer789 |
当前输出,尝试使用查找、查找、连接的各种分组和表达式
| MainGroup | QuestionTab | QuestionRow | Question1output | Answer1output | Question2output | Question2output |
|-----------|-------------|-------------|-----------------|---------------|-----------------|-----------------|
| Group1 | TabA | 1 | Question1 | Answer1 | | |
| Group1 | TabA | 1 | | | Question2 | Answer2 |
| Group1 | TabA | 2 | Question3 | Answer3 | | |
| Group1 | TabA | 2 | | | Question4 | Answer4 |
etc etc
期望的输出
| MainGroup | QuestionTab | QuestionRow | Question1output | Answer1output | Question2output | Question2output |
|-----------|-------------|-------------|-----------------|---------------|-----------------|-----------------|
| Group1 | TabA | 1 | Question1 | Answer1 | Question2 | Answer2 |
| Group1 | TabA | 2 | Question3 | Answer3 | Question4 | Answer4 |
| Group1 | TabB | 1 | Question234 | Answer234 | | |
| Group1 | TabB | 2 | Question789 | Answer789 | | |
【问题讨论】:
标签: reporting-services ssrs-2012 ssrs-tablix