简体   繁体   English

在SSRS中,tablix不选择动态SQL中生成的文本进行分组

[英]In SSRS, tablix not picking up the text generated in a dynamic SQL for grouping

In SSRS, I have written a dynamic sql in which a column is populated from a case statement. 在SSRS中,我编写了一个动态sql,其中从case语句填充了一个列。 The sql query is correctly populating the column in sql result but when I use it in a tablix for creating a group and summing it by 'X' column as shown below. sql查询正确填充了sql结果中的列,但是当我在tablix中使用它来创建组并按“ X”列对其求和时,如下所示。 It does not populate at all. 它根本不填充。 Rest of tablix is populating fine. Tablix的其余部分填充良好。 Can somebody please help. 有人可以帮忙吗?

eg: The columns generated by SQL has below result. 例如:SQL生成的列的结果如下。 Bucket is generated by case statement. 存储桶由case语句生成。 In tablix I want the first row to be grouped by Bucket and in next row sum by the x column 在tablix中,我希望第一行按Bucket分组,在下一行中按x列求和

>  **X**   **Bucket**
>     0     NULL
>     1     Today
>     1     1-10
>     1     11-20
>     0     NULL
>     1     1-10
>     1     Today
>     1     20-30

Expected Result 预期结果

> Today  1-10  11-20  20-30
>   2     2      1      1

Set your column grouping expression to Bucket and the detail row will simply have an expression like =SUM(Fields!X.Value) . 分组表达式设置为Bucket,明细行将仅具有=SUM(Fields!X.Value)类的表达式。

You don't need any row grouping 您不需要任何分组

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM