SSRS。将报告中一行的 2 个不同部分分组

发布于 2024-09-16 09:19:01 字数 308 浏览 1 评论 0原文

我使用 SQL 2008 我的报告左边有几个组,然后是一些数字和另一个数字(更右边)也必须分组。

Field1 Filed2 Filed3 Num1 Num2 Num3 Num4
fff    sss    aaa    1000 2000 3000 4000
              bbb    2000 3000
              ccc    4000 5000

即,对于 Filed1 + Field2 的每个组合,Num3 和 Num4 都相同

我可以使用 BIDS 报表设计器实现此目的吗?

I use SQL 2008
I have report with few groups on the left, then some numbers and another numbers (further on the right) which has to be groupped as well.

Field1 Filed2 Filed3 Num1 Num2 Num3 Num4
fff    sss    aaa    1000 2000 3000 4000
              bbb    2000 3000
              ccc    4000 5000

i.e. Num3 and Num4 are the same for each combination of Filed1 + Field2

Can I achieve this using BIDS report designer?

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

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

发布评论

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

评论(2

好听的两个字的网名 2024-09-23 09:19:01

是 - 假设您已经根据数据集将未分组的表插入到报告中,并且想要单独按 Field1 和 Filed2 进行分组:

  1. 将组插入表中(通过选择其中一行,然后从右侧选择“插入组” -单击菜单,在“插入组”对话框的“常规”和“排序”选项卡上将“Field1”和“Filed2”指定为两个单独的项目,然后取消选中“常规”选项卡上的“包括组页眉”和“包括组页脚”选项
  2. 对于每个 Field1、Filed2 。 、详细信息行中的 Num3 和 Num4 单元格,将 Visibility>Hidden 表达式(在“属性”窗口中)设置为如下所示:

    =Iif(Fields!FIELD1.Value = Previous(Fields!FIELD1.Value) and
    Fields!FILED2.Value = Previous(Fields!FILED2.Value), True, False)

Yes - assuming you have already inserted an ungrouped table based on your dataset into your report, and want to group by Field1 and Filed2 alone:

  1. Insert a group into the table (by selecting one of the rows, and selecting Insert Group from the right-click menu. Specify Field1 and Filed2 as two separate items on both the General and Sorting tabs of the Insert Group dialog, and uncheck the Include Group Header and Include Group Footer options on the General tab.
  2. For each of the Field1, Filed2, Num3 and Num4 cells in the detail row, set the Visibility>Hidden expression (in the Properties window) to be like the following:

    =Iif(Fields!FIELD1.Value = Previous(Fields!FIELD1.Value) and
    Fields!FILED2.Value = Previous(Fields!FILED2.Value), True, False)

浮生面具三千个 2024-09-23 09:19:01

只需按照您希望显示的顺序添加您想要的每个组作为(父组),不带页眉或页脚。然后添加您想要始终显示的其余列。结果应该是这样的。

ParentGrp1      ParentGrp2    Col1       Col2      Col3
Valdez          Spill         abc        xyz        123
                              bca        kfj        222
                              emf        lrl        333
                Spill2        abd        omc        412
                              oke        ttl        555

如果这就是你的目的。否则,您始终可以使用标记技术来使任何字段按顺序不显示连续多个。

Just add each one you want as a (parent group) with no header or footer, in the order you want them displayed. Then add the rest of the columns you want to always be displayed. The results should look like this.

ParentGrp1      ParentGrp2    Col1       Col2      Col3
Valdez          Spill         abc        xyz        123
                              bca        kfj        222
                              emf        lrl        333
                Spill2        abd        omc        412
                              oke        ttl        555

If this is what your going for. Otherwise you can always just use Marks technique to make any field in order not display multiple in a row.

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