报表服务:两张表合计 [英] Reporting Services: Two Tables One Sum

查看:107
本文介绍了报表服务:两张表合计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的报告如下:

一个表在组页脚处提供财务信息及其总和(分组称为"StockTable_Shipped").该组由一个布尔值控制(1 =显示出厂数据,0 =显示收到的数据)

One table provides financial information with sums at the group footer (Grouping is called "StockTable_Shipped"). The group is controlled by a boolean value (1=shows shipped data, 0 = shows received data)

第二个表是已发送数据(布尔值1)的差异报告,该数据在表的底部.

The second table is a variance report for data that has been shipped (boolean value of 1) and has a sum at the bottom of the table.

我的最终目标是从发运= 1的表1中提取总和,并从表2的差异总和中减去.

My ultimate goal is to take the sum from table1 where shipped=1 and subtract it from the variance sum from table2.

这将放置在报告底部的文本框中.

This will be placed in a textbox at the bottom of the report.

我知道这听起来是否令人困惑,但我很乐意提供更多信息.

I understand if this sounds confusing but I would be more then happy to provide more information.

推荐答案

如果我是您,我将创建一个新的计算字段,该字段将保存您所有发货数据(1)的总和,而不仅仅是您所有数据的总和(1和0).

If I were you, I would create a new calculated field which would hold the sum of all your Shipped Data (1's) not just the sum of all your data (1's and 0's).

此后,它应该很简单,只要输入一个表达式,该表达式将从table2字段的总和中减去您的计算字段.

After that, it should be as simple as putting in the expression that subtracts your calculated field from the Sum of your table2 field.

这篇关于报表服务:两张表合计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆