CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 summing up with event error

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message
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

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.