报告服务矩阵行问题

发布于 2024-09-24 01:12:45 字数 455 浏览 3 评论 0原文

我有一份报告试图以矩阵形式显示。行按称为“类别”的列进行分组。列名称是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

为你拒绝所有暧昧 2024-10-01 01:12:45

您只能在矩阵的单元格中显示一个值 - 通常,这是某种聚合值。为了显示多个值,您需要有多个单元格 - 这意味着向行或列添加另一个组。

假设每个任务名称都不同(如示例数据中所示),我建议在查询中添加一个新列,以保存类别和 vcName 中 vcTaskName 的运行计数 - 这样您的数据将如下所示

Category       vcTaskName        vcName    TaskRunCount
a              task1             dog       1
a              task2             dog       2
a              task3             cat       1
a              task4             bird      1

:将第二组添加到 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:

Category       vcTaskName        vcName    TaskRunCount
a              task1             dog       1
a              task2             dog       2
a              task3             cat       1
a              task4             bird      1

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.

泪眸﹌ 2024-10-01 01:12:45

您必须对报告进行屏幕截图或打印并粘贴到此处,看来您已将该字段放入分组中。无论是否有表达式并不重要,一旦将字段放入组中,报告服务就会采用函数 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().

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文