在Crystal Report中添加两个表格的字段总和给出奇怪的结果 [英] Adding Sum of fields of two tables giving strange result in Crystal Report

查看:519
本文介绍了在Crystal Report中添加两个表格的字段总和给出奇怪的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Visual studio使用SAP水晶报表。



我有两个表(TableA,TableB)。

TableA
字段:PriceA = {20,40,40};



TableB
Field:PriceB = {50.40,60};



我在我的主报告中创建了一个公式 Formula1 = Sum .PriceA)+ Sum(TableB.PriceB)



但不是将结果作为@ Formula1 = 250。



如何在这种情况下得到正确的结果。


<我建议插入每个字段的摘要(右键单击字段 - >插入 - >摘要),然后使用公式创建两个和的总和。


I am using SAP crystal reports for Visual studio.

I have two tables (TableA, TableB). with fields PriceA, PriceB.

TableA Field : PriceA ={20,40,40};

TableB Field : PriceB ={50.40,60};

I have created a formula in my main report Formula1 = Sum(TableA.PriceA) + Sum(TableB.PriceB)

But instead of getting result as @Formula1 =250. It is giving the incorrect result like '1050' (not exact).

How can i get a correct result in this case.

解决方案

I would suggest inserting a summary of each field (right-click on field -> Insert -> Summary) and then creating a sum of the two using a formula.

这篇关于在Crystal Report中添加两个表格的字段总和给出奇怪的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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