SSRS报告中如何自定义主要分组(按组)的问题

huangapple go评论60阅读模式
英文:

Questions SSRS Reports on how to customize primary groups (Group BY)

问题

如果可能的话,我想请教如何完成以下操作。

正如您所见,它在行上显示了产品列表,按列上的“食品类别”进行分组,然后在“食品类别”旁边,再按“食品类型”进行分组,同时显示一个总数。

这个任务已经完成。我想要的是在第二列的分组上,通过某种表达式的帮助,将第一组中的“Salmon”和“Tuna”的部分合并成一个,或者使它们消失,只显示第一组中的“FISH”。

另一个问题是,如果我们有一个新的按日期分组,日期格式为23/01/2023,如果我想根据日期的值将其更改并按月份和年份进行分组,如下所示:

这两个操作如何完成,是否可能?

谢谢。

英文:

If possible, I would like to ask for help with how to do the following.

As you can see, it shows the list of products on the rows, group by "food category" on the first group by on the column, then another group by "type of food" next to "food category" along with a total.

This task is already completed. What i want is that on second column group by, made somewhat with the help of an expression that:

The second column ground, at the part of Salmon and Tuna, join those two columns into one or make it disappear and just show FISH from the first group by.

SSRS报告中如何自定义主要分组(按组)的问题

And the other and last question, if we have new group by, by date with format 23/01/2023, if i want to change and group by month and year with that date value so we have:

SSRS报告中如何自定义主要分组(按组)的问题

How can i do both things, is that possible?

Thanks.

答案1

得分: 1

我解决了第二个问题。在主分组内格式化日期字段。如果有人觉得有用,我会在这里发布。

第一步:

使用以下代码格式化日期字段:=Format(CDate(Fields!date.Value), "MMMM yyyy")

第二步:

在日期分组属性中,在"常规"选项中,添加分组表达式:

  1. =Year(Fields!date.Value)
  2. =Month(Fields!date.Value)

我仍然需要帮助:

正如您所看到的,它显示了产品列表,按"食品类别"在列上的第一个分组,然后在"食品类别"旁边按"食品类型"进行另一个分组,并显示总数。

这个任务已经完成。我想要的是在第二列分组中,通过表达式的帮助,将第一组中的Salmon和Tuna两列合并成一列,或者使其消失,只显示来自第一个分组的FISH。

感谢和亲切的问候。

英文:

i resolved the second question. Format the date field inside the primary group so.

I will post it here if someone finds it useful.

First step:

Format the date field with =Format(CDate(Fields!date.Value), "MMMM yyyy")

Second step:

On group date properties, in General, add group expressions:

  1. =Year(Fields!date.Value)
  2. =Month(Fields!date.Value)

SSRS报告中如何自定义主要分组(按组)的问题

I still need help with:

As you can see, it shows the list of products on the rows, group by "food category" on the first group by on the column, then another group by "type of food" next to "food category" along with a total.

This task is already completed. What i want is that on second column group by, made somewhat with the help of an expression that:

The second column ground, at the part of Salmon and Tuna, join those two columns into one or make it disappear and just show FISH from the first group by.

SSRS报告中如何自定义主要分组(按组)的问题

Thanks and kind regards,

huangapple
  • 本文由 发表于 2023年2月24日 15:20:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/75553597.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定