Values wrong SUM rows in report viewer

206 views Asked by At

In a report there are 3 lines, the last line should add the previous lines. I'm using = Sum (Fields!Num1.Value), NUM1 is a dataset field that loads the report. However the sum of these fields is returning wrong values. Someone already experiencing a situation like this?

Regards

1

There are 1 answers

0
Kevin On

You may need to add the second parameter of the Sum() method (the scope).

for example, if your dataset is called "DataSet1", you would have:

=Sum(Fields!Num1.Value, "DataSet1")

Additionally, depending on the values being filled into these columns in your dataset, you may need to convert them to a data type that the engine can Sum. If you're filling the column with a string representation of an integer, for example "15" (Note that this is a string), you would have to convert the value to an integer.