Problem to calculate formula

Hello

Good afternoon.

I'm having problems with formulas in crystal'm new to the program, I have to create a formula that has to sum the values.

I created a formula to sum.

1

1

3

1

1

1

2

3

1

2

total = 16

more is not the correct value for the report is that the sum certain.

1

1

3

1

1

1

2

3

1

2

total = 10

it not only sums the values that two or more.

version of Crystal Reports XI

Re: Problem to calculate formula

It seems to me that you are using "Count" instead of "Sum"

Are you using RunningTotal field or a Formula field?

If it is a formula then post the code and say in which section you placed it

Re: Problem to calculate formula

Quote:

Originally Posted by

**jggtz**
It seems to me that you are using "Count" instead of "Sum"

Are you using RunningTotal field or a Formula field?

If it is a formula then post the code and say in which section you placed it

Hello

good day

I'm using a field forluma, section I put in Group footer # 3.

I made two formulas to find the value;

1st

Numbervar i;

i: = Sum (AGR_FALTA_ATESTADOS_V.FALTAS {}, {} AGR_FALTA_ATESTADOS_V.CD_FUNC);

2nd

numberVar i: = 0;

if (AGR_FALTA_ATESTADOS_V.FALTAS {})> 0

then i: = i +1

The second that I'm using.

Re: Problem to calculate formula

In first formula you are storing the Sum of field FALTAS in variable i

In second formula you are initializing the variable i and then storing the Count of field FALTAS

It's not clear enough

What are you trying to achieve?

Count each time there are FALTAS or SUM the FALTAS?

Re: Problem to calculate formula

is to account for the lack of formula. the amount of foul.

Re: Problem to calculate formula

Quote:

Originally Posted by

**Fabiano2016**
is to account for the lack of formula. the amount of foul.

is to account for the lack of formula. the amount of foul.

Re: Problem to calculate formula

Quote:

Originally Posted by

**Fabiano2016**
is to account for the lack of formula. the amount of foul.

Can anyone help me.