Hi.
Here is an attempt to explain a feature that -IMO- xbrowse should be enhanced with.
The idea is to make xbrowse smart enough to be able to browse a master table and a transaction table the same way a tree is currently xbrowsed. Here is how it would work:
Let's imagine we are xbrowsing a customers table that happens to contain 1M records. Each record on this table directly translates to a row on the xbrowse. The xbrwose displays 6 columns. Each column relates directly to a field on the customers table. Let's call this table "Customers". The fields on this table are:
1. Customer ID -Primary-Unique Key
2. Customer Name
3. Customer address
4. Customer Telephone
5. Customer CellPhone
6. Customer Fax
Currently we create this browse roughly like this:
- Code: Select all Expand view
REDEFINE XBROWSE obrw ALIAS (customers)->cAlias ID 100 OF oDlg AUTOCOLS
Let's further suppose we have another table, namely "Sales" table. The table contains an entry for each purchase that each customer has ever done. The table is composed of records and each record is made up of 5 fields:
1. Customer ID - (Foreign Key into customers table)
2. SalesDate
3. ItemId
4. ItemDescrip
5. Amount
As you are xbrowsing the Customers table, at some keyboard or mouse action, imagine that all the sales records on the sales table are inserted for show on the xbrowse just underneath the customer in question and before the next customer. Obviously each customer record is not homogenous to the rows to be inserted on the xbrowse from the sales table. That behavior is known to many on this forum as xbrowsing a LinkList (or tree). As in:
- Code: Select all Expand view
oBrw:SetTree( ::buildTree() )
The problem with xbrowsing a tree is that the tree must be created in memory just before xbrowsing it. If the customers table is a large table, as it would be on any real world application, then it is impossible and impractical to load the complete table to memory on a linked list.
Currently, I simply popup a dialog with another xbrowse to display detail transactions. Other people here -I have seen- keep two separate xbrowses next to each other. That's ok, but not nearly as elegant as xbrowsing a tree.
If this is already possible with xbrowse, then would anyone here please show how? If it is not, as I'm assuming, then perhaps Mr. Rao would see this feature a worth implementing?
Reinaldo.