Link to home
Start Free TrialLog in
Avatar of KavyaVS
KavyaVS

asked on

How to count the number of non empty cells in the column using formula field.

Hi,
1.How to count the number of non empty cells in the column using formula field.The column has string value in some cells.some cells are empty.

2.I have a column with Amount in the Table.I am showing the sum of the amount in the Group footer.
It has empty cells.If all the cells are empty.It is showing nothing in the group footer.
For that I added a formula field.But it is always showing $0.00 even if it has amount.Please let me know any corrections.

If Sum({table.field})>$0.00 then
Sum({table.field})
Else
$0.00

Thanks.
SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KavyaVS
KavyaVS

ASKER

Hi peter57r,
Empty means empty string .It's not null
Count({table.field}) giving the correct count of non-empty fields.

I tried this for summing the Amount.But it is giving the error. The error is A string is required here.Amount is Currency Field Type.

If Trim({table.stringfield})= "" then
0
Else
({table.stringfield})


Hi mlmcc,
I inserted the summary in the group footer. But it is not showing the 0.00 when all the cells are empty.Empty means empty string .It's not null.


Thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KavyaVS

ASKER

You are right.The stored procedure returing null values and Crystal report showing empty string.

I am talking about two columns.One is string type and other one is currency Data Type.For both columns the stored procedure returning null values and Crystal report showing empty string.

For currency data type column I inserted the summary value in the group footer.But it is not showing $0.00 if all the cells in the column are empty.It is not showing anything.
For that currency column sum I need a formula field.

Thanks.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KavyaVS

ASKER

Thanks