报告服务矩阵行问题
我有一份报告试图以矩阵形式显示。行按称为“类别”的列进行分组。列名称是 vcName。详细信息是 vcTaskName。我似乎无法弄清楚的部分是,即使存在具有该行值的多个任务名称,也只会显示一行。
尝试举个例子。
Category vcTaskName vcName
a task1 dog
a task2 dog
a task3 cat
a task4 bird
因此,当类别为行时,只有任务 1 显示为狗,任务 2 不显示。对于猫和鸟,任务 3 和任务 4 正确显示。这三个表达式中都没有任何内容将其限制为第一个。
无论如何...我希望这些信息足以开始。 谢谢 香农
I have a report that i'm trying to display in a matrix. The Row is grouped by a column called Category. The column name is vcName. The detail is vcTaskName. The part that i can't seem to figure out is that only one row will show up even if there are multipal tasknames with that row value.
Try to give an example.
Category vcTaskName vcName
a task1 dog
a task2 dog
a task3 cat
a task4 bird
so with Category being the row, only task1 is showing up for dog, task 2 doesn't display. for cat and bird task 3 and task 4 show up correctly. None of these three have anything in the expression to limit it to first.
Anyway... i hope that is enough info to get started.
Thanks
Shannon
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您只能在矩阵的单元格中显示一个值 - 通常,这是某种聚合值。为了显示多个值,您需要有多个单元格 - 这意味着向行或列添加另一个组。
假设每个任务名称都不同(如示例数据中所示),我建议在查询中添加一个新列,以保存类别和 vcName 中 vcTaskName 的运行计数 - 这样您的数据将如下所示
:将第二组添加到 TaskRunCount 上的 Tablix - 这将确保任务 1 和任务 2 将显示在狗列中的不同行上。
You can only display one value in a cell in a matrix - normally, this is some sort of aggregate value. In order to display multiple values, you need to have multiple cells - this means adding another group to either the rows or the columns.
Assuming that each task name is going to be different (as in the sample data), I suggest adding a new column to your query to hold the running count of vcTaskName within the Category and vcName - so your data would look like this:
and then add a second group to the Tablix on the TaskRunCount - this will ensure that task1 and task2 will appear on separate lines in the dog column.
您必须对报告进行屏幕截图或打印并粘贴到此处,看来您已将该字段放入分组中。无论是否有表达式并不重要,一旦将字段放入组中,报告服务就会采用函数 FIRST()。
YOu will have to do a screen capture or print of the report and paste here, it appears you have placed the field in a grouping. Wether there is an expression or not doesnt matter, once you place a field in a group reporting services assumes the function FIRST().