Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net Reporting Services 2005在表中减去2个值_Asp.net_Sql Server_Reporting Services_Reportingservices 2005 - Fatal编程技术网

Asp.net Reporting Services 2005在表中减去2个值

Asp.net Reporting Services 2005在表中减去2个值,asp.net,sql-server,reporting-services,reportingservices-2005,Asp.net,Sql Server,Reporting Services,Reportingservices 2005,我在表对象中显示了一个费用列表。我想在文本框中显示两种费用之间的差异(不确定这是在表尾还是在组尾)。我能简单地求和,但我不知道如何减去值。在本例中,假设我想显示许可费和注册费(999-333)的差异。我如何使用组/过滤器等进行此操作?顺便说一句,我希望在报表级别而不是在存储过程中执行此操作!先谢谢你 这就是数据输出的样子: FeeDescription FeeValue License $999.00 Registration $333.00 Inspec

我在表对象中显示了一个费用列表。我想在文本框中显示两种费用之间的差异(不确定这是在表尾还是在组尾)。我能简单地求和,但我不知道如何减去值。在本例中,假设我想显示许可费和注册费(999-333)的差异。我如何使用组/过滤器等进行此操作?顺便说一句,我希望在报表级别而不是在存储过程中执行此操作!先谢谢你

这就是数据输出的样子:

FeeDescription    FeeValue
License           $999.00 
Registration      $333.00 
Inspection        $444.00 
Title             $555.00 
Tire Fee          $5.00 
Battery Fee       $1.50 
MVWEA (Lemon Law) $2.00 

我猜你在用桌子。因此,可以使用相关单元格的Value属性中的表达式进行计算。 对于项目级行:
=字段!许可证。值字段!注册。值

对于组级行:
=sum(Fields!License.Value-Fields!Registration.Value)

类似的方法应该可以工作

=sum(iif(Fields!FeeDescription="License" or Fields!FeeDescription="Registration",Fields!FeeValue,0))

谢谢,但这不起作用,因为没有名为“许可证”或“注册”的字段。数据集中的字段是“FeedDescription”和“FeeValue”。“许可证”和“注册”是返回的数据的一部分,我想包括在计算中。看,这是一些重要的内容,在原始区域帖子中可能会很有用