Adding Sum of fields of two tables giving strange

2019-09-02 03:15发布

问题:

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.

回答1:

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.