At 12:36 PM 4/4/2008, Tom Frederick wrote:
Started adding a scroll within a form for a slave table. The data is
entered elsewhere and the scroll is simply informational. A button
is included to allow the user to go off to the detail if they want.
Works great and the users like it. Two questions:
1. Is there a way to use the ORDER BY command for that slave based scroll?
2. Can there be more than one unrelated slave scroll, each using
separate ORDER BY commands in the same form?
Unrelated slave scrolls without ORDER BY work fine, but getting
separate ORDER BYs to work is tapping the edge of my current
understanding in R:Base V8.
Tom,
If you have a form with slave tables and a report with sub-reports,
and if you wish to sort (ORDER) the matching rows related to slave
table(s)/sub-report(s), you'll need to use the ARRANGE BY clause to
achieve your goal.
ARRANGE tablename BY columnlist sorts the rows displayed by a form's
or report's lower-level tables. Each lower-level table in the form or
report that you want to sort requires its own ARRANGE clause. You can
specify up to twenty-five tables to ARRANGE and up to five columns in
each table on which R:BASE will sort.
Here's how:
-- Example 01
Database: RRBYW14
Sample Form: SalesTransactions
Associated Tables (5):
. Customer (Master)
. InvoiceHeader (Slave 1)
. InvoiceDetail (Slave 2)
. Employee (Slave 3)
. Contact (Slave 4)
Command:
-- Begin
EDIT USING SalesTransactions +
ARRANGE InvoiceHeader BY TransID, +
ARRANGE InvoiceDetail BY ItemNum, +
ARRANGE Employee BY EmpLName,EmpFName +
ARRANGE Contact BY ContLName,ContFName +
ORDER BY Company WHERE CustState = 'CA'
RETURN
-- End
-- Example 02
Database: RRBYW14
Sample Report with Sub-Report: CustomerContacts
Associated Tables (2):
. Customer (Master)
. Contact (Slave 1)
Command:
-- Begin
PRINT CustomerContacts +
ARRANGE Contact BY ContLName,ContFName +
ORDER BY Company WHERE CustState = 'CA' +
OPTION SCREEN|WINDOW_STATE MAXIMIZED +
|ZOOM_TYPE PERCENTAGE|ZOOMPERCENT 90
RETURN
-- End
That's all there is to it!
Very Best R:egards,
Razzak.