Create a formula for your Count columns something like this
IF {table.Jan} <> 0 THEN 1 ELSE 0 +
IF {table.Feb} <> 0 THEN 1 ELSE 0 +
IF {table.Mar} <> 0 THEN 1 ELSE 0 +
IF {table.Apr} <> 0 THEN 1 ELSE 0 +
IF {table.May} <> 0 THEN 1 ELSE 0
Pregunta
I'm using Crystal Reports 2008. I have an output like this:
Customer Total Amount Jan Feb Mar Apr May
A 20000 1000 2000 5000 0 7000
B 15000 5000 7000 3000 0 0
C 18000 8000 5000 0 8000 0
D 5000 5000 0 0 0 0
How can I make count the fields from Jan to May without the zero field value? So the output will be like this:
Customer Total Amount Jan Feb Mar Apr May Count
A 20000 1000 2000 5000 0 7000 4
B 15000 5000 7000 3000 0 0 3
C 18000 8000 5000 0 8000 0 3
D 5000 5000 0 0 0 0 1
Thanks..
Solución
Create a formula for your Count columns something like this
IF {table.Jan} <> 0 THEN 1 ELSE 0 +
IF {table.Feb} <> 0 THEN 1 ELSE 0 +
IF {table.Mar} <> 0 THEN 1 ELSE 0 +
IF {table.Apr} <> 0 THEN 1 ELSE 0 +
IF {table.May} <> 0 THEN 1 ELSE 0