Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to put running balance in local view?
Message
From
28/04/1999 11:54:11
 
 
To
28/04/1999 09:01:04
George Simon
GS Data Technologies, LLC
Cincinnati, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00212879
Message ID:
00213037
Views:
40
>Hi Peter,
>
>I had a similar situation and opted to create a seperate view for the account balance. That way I did not have to deal with the issue of adding a record to a non-updatable view for presentation purposes.
>
>George


Hi George.

If I follow you, I would create a separate view with only the yBalance field and populate it properly so that there is a 1-1 correspondence between the main detail view and the balance view. I would set the data source of the balance column in the grid to the yBalance field in the second view.

Question: Will the two views move in sinc when the user scrolls within the grid?

Peter



PS to All:
Anyone have a bright idea how to write SQL which would calculate the running balance as the original detail grid is populated? Something like SumFromTop()?

Hmmm... Now that I think about it maybe I could write a UDF that would sum the detail which has an entered date-time and record number less than or equal to the current record. Sounds terribly inefficient but with a max of 100 or 200 detail records maybe the user wouldn't notice.
Peter Robinson ** Rodes Design ** Virginia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform