简体   繁体   English

如果字段为 1,则报表生成器 SSRS 中的表达式将数据发送到第 1 页,将数据发送到第 2 页

[英]Expression in Report Builder SSRS if the field is 1 send data to page 1 and 2 to pagé 2

I have a stored procedure in SQL, in that stored procedure there are only two data from a field called head, the data is 1 and 2, if the head field shows results of 1, those results will have to be sent to page 1 of Report Builder SSRS and if the head field shows results of 2, the data will have to be sent to page 2 of Report Builder.我在 SQL 中有一个存储过程,在该存储过程中,只有两个来自名为 head 的字段的数据,数据为 1 和 2,如果 head 字段显示结果为 1,则必须将这些结果发送到第 1 页报表生成器 SSRS,如果头部字段显示结果为 2,则必须将数据发送到报表生成器的第 2 页。 How could I do the expression?我该如何表达? I am working with tables and matrices in Report Builder and the results have to be sent to the matrices我正在使用报表生成器中的表和矩阵,结果必须发送到矩阵

Have your data grouped by Head (see https://docs.microsoft.com/en-us/sql/reporting-services/report-design/understanding-groups-report-builder-and-ssrs?view=sql-server-ver16 for how to) and in the group's properties set "Page Breaks" to "Between each instance of a group".将您的数据按Head分组(请参阅https://docs.microsoft.com/en-us/sql/reporting-services/report-design/understanding-groups-report-builder-and-ssrs?view=sql-server- ver16了解如何)并在组的属性中将“分页符”设置为“在组的每个实例之间”。

You don't need any formulas or other settings, and you can add group headers or footers to include subtotals for each page.您不需要任何公式或其他设置,并且可以添加组页眉或页脚以包括每个页面的小计。 If your data takes more than a page, it will automatically break the page, display what is left, and then start the next "head" group on a new page.如果您的数据超过一页,它会自动分页,显示剩余内容,然后在新页面上启动下一个“head”组。

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

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