It has been a very busy week for me and this month I was not able to write my blog in programming most of the time. But anyways in this article I would like to share with you a most common programming problem in creating business applications using Microsoft Visual Foxpro that is how we add the total sum in a column in a table.
This problem is very common when we purchase a product for example in a grocery store we observe that it sum all the prices of the product we purchase at the end of our receipt. Another example in enrollment system in the enrollment form we can see the total number of units taken by the student in that particular semester. The solution of this problem is quiet very simple there is a built in function in Visual Foxpro called SUM that we can use to sum up all the values in a given column. What is very good about Visual Foxpro programming using this language is very easy and the code is very short that's why until now there still many Visual Foxpro developers around the world still using it in creating business applications.
The program code is very short and I can say self explanatory if you have a good working knowledge in Foxpro or Dbase programming experience. I hope you will find my work useful and thank you.
Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com.
My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
Database Structure
Sample data stored in the table
Sample Program Output
Program Listing
demo.prg
*** Author : Mr. Jake R. Pomperada, MAED-IT
*** Tool : Microsoft Visual Foxpro 8.0
*** Date : November 19, 2016 Saturday
Clear
SELECT item
SUM price TO nTotal
@ 2,1 Say "Total Price is " get ntotal
No comments:
Post a Comment