by nageswaragunupudi » Wed Apr 10, 2013 7:28 am
This is not an issue relating to XBrowse, but a matter relating to understanding and managing "relationships" and "indexes" in RDD. First we handle this the way we need, without getting confused with xbrowse or some other browse. Once we do this first, browsing in any browser is a matter or routine.
Once we set relation, we can NOT change the order of the child DBF without breaking the relationship. We can change the order of the parent dbf but not the child dbf.
We can create an additional index order on the parent dbf with expression "child->columnname". This is now an additional tag of the parent dbf and so we can change to it.
SELECT ARTICULO
SET RELATION TO CODFAM INTO FAMILIA
GO TOP
INDEX ON FAMILIA->NAME TAG FAMILA_NAME TO TMP MEMORY ADDITIVE
// RESET ORDER TO THE FIRST ORDER AS YOU WANT
REDEFINE xBrowse oBrw id 4005 OF oDlg ;
COLUMNS "DESCRIP", "FAMILA->NAME" ; // Never use FIELDS. Always use COLUMNS
HEADERS "DESCRIPTION", "NAME" ;
ALIAS "ARTICULO" // Never Never Omit this
WITH OBJECT oBrw:aCols[ 2 ]
:cSortOrder := "FAMILA_NAME"
:cOrdBag := "TMP"
END
// other code
NOTE: I have assumed that ARTICULO and FAMILA are real ALIAS names and not variable names containing the alias names. If they are variable names, pls change the code accordingly
Regards
G. N. Rao.
Hyderabad, India