CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> .NET

 count total using two fields within a grid

Print topic Send  topic

Author Message
PaulK

Posts: 15
Posted: 04/27/2006, 12:33 PM

Hi

Im trying to find a way of being able to calculate a value of a field within a grid. Basicaly i have an editable grid that allows the user to enter a price and a quantity, i want the system to automatically calculate the total for the items eg quantity * cost and then put the calculation within a total field. Here is an example of the editable grid..

http://www.tfis.org/example.jpg

I presume you can do it using javascript however im not sure how to do it. Because there are mutlple rows, im not sure how to control the fields, i presume its some sort of array or something :). Anyway i was wondering if someone could point me in the right direction

Thanks for any help
Paul
View profile  Send private message
PaulK

Posts: 15
Posted: 04/27/2006, 1:24 PM

Just got a work around working just now,

Basically adding the following into the SQL Select query...

sum(unitCost * quantity) as totalCosts

and using the field to use the totalCosts as the control source, is working fine to display the grid, however i would still like to know how i could do it on the live form using java (i presume).
View profile  Send private message

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.