At 02:25 PM 3/31/2009, [email protected] wrote:
I have a request from my users who are using a form which has all the data being displayed in a DB Grid. They need the ability to find the sum of a range of rows like one does in Excel. I know you can display record numbers in DB Grid, can that be captured and then used to calculate the sum between starting and ending record numbers?
Ajay, Ask and you shall receive! Did you know that you have such sample already on your 2009 SAT Sample Applications? http://www.rupdates.com/sat2009 Take a look at "All About DB Grid" section. In addition, take a look at the "SalesTransactions" form in Running R:BASE Your Way! (Part 15). This specific form illustrates the use of defining Sub-Totals and Totals for a given dataset, including the selected row(s). CONNECT RRBYW15 EDIT USING SalesTransactions + ARRANGE InvoiceHeader BY TransID, + ARRANGE InvoiceDetail BY DetailNum, + ARRANGE Employee BY EmpLName,EmpFName + ARRANGE Contact BY ContLName,ContFName + ORDER BY Company WHERE CustState = 'PA' RETURN Notice the dynamic display of "YTD Invoice Total: $$$,$$$,$$" for selected customer. You may further customize this technique using the GETPROPERTY command such as, GETPROPERTY TABLE 'tablename->RECORDCOUNT' vCount and GETPROPERTY TABLE 'tablename->RECNO' vRecNo Hope that helps! Very Best R:egards, Razzak.

