在 SSRS 中创建条件总行

发布于 2024-10-08 03:24:05 字数 362 浏览 0 评论 0原文

我正在创建一个必须模仿现有报告的报告……它有总计和小计。

问题是小计基于不同的标准......

所以:

Apples           5
Oranges          6
Beans            3
Grapes           8
Peas             3

Total Fruit:    19
Total Veggies:  6
Grand Total :   25

假设我有一个字段告诉我一个项目是否是水果/蔬菜,我如何创建仅根据以下内容添加的大计行(在页面底部)另一个字段的值?

我不想要单独的组。格式应保持原样。

I am creating a report that has to mimic and existing report… it has grand totals and subtotals.

Problem is the subtotals are based on different criteria…

So:

Apples           5
Oranges          6
Beans            3
Grapes           8
Peas             3

Total Fruit:    19
Total Veggies:  6
Grand Total :   25

Assuming I have a field that tells me if an item is Fruit/Veggie, how can I create grand subtotal row (at the bottom of the page) that will only add based on the value of another field?

I do not want separate groups. The format should remain as is.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

痴情 2024-10-15 03:24:05

将计算字段添加到分别对水果和蔬菜进行总计的基础数据集。这样,适当的小计就可以基于计算的字段。

如果您有一个 ItemType 字段,包含“Fruit”和“Vegetable”,则可以创建一个类似 =Sum(Iif(Fields![ItemType]="Fruit",1,0)) 的函数来仅对水果求和。

Add calculated fields to the underlying dataset that total Fruit and Veggies separately. That way the appropriate sub total can be based on the calulated field.

If you had a field that was ItemType, containing "Fruit" and "Vegetable", you could create a function like =Sum(Iif(Fields![ItemType]="Fruit",1,0)) to sum only the fruit.

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