charles
|
| Posted: 04/05/2005, 3:12 AM |
|
Can someone please help me figure this out.
Every time i use the before show row event to sum up values where two negative values are involved, the system does'nt add up properly.I know i must be doing something wrong but can't figure out what.I am using ASP.
Regards,
Charles
|
|
|
 |
Nicole
Posts: 586
|
| Posted: 04/05/2005, 5:32 AM |
|
Charles,
Try to format data to Double or Long data type (depending on data type of table field) before summing using CDbl() or Clng() functions.
_________________
Regards,
Nicole |
 |
 |
charles
|
| Posted: 04/26/2005, 5:19 AM |
|
Nicole,
Thanks for the response but You lost me!
How do i do this in codecharge studio?
Please kindly state the steps i need to take.
Regaesa,
Charles
|
|
|
 |
Nicole
Posts: 586
|
| Posted: 04/26/2005, 5:30 AM |
|
Charles,
Just apply CLng() or CDbl() functions to values used in calculation. E.g.
CDbl(form_name.field_name1.Value) + CDbl(form_name.field_name2.Value)
_________________
Regards,
Nicole |
 |
 |
charles
|
| Posted: 04/28/2005, 9:21 PM |
|
hi nicole,
I have applied this function to my formula as suggested
admin_expense.totaladmin.value=CDbl(admin_expense.totaladmin.value)+CDbl(admin_expense.totalexpense.value)
netprofit.value=CDbl(grossprofit.value) - CDbl(admin_expense.totaladmin.value)
but the problem persisted.
Now am thinking if i can do a walk around with an if-Else statement.
Any Suggestions?
Thanks for always sharing
Regards,
Charles
|
|
|
 |
|