by Richard Chidiak » Sun Apr 03, 2011 3:21 pm
Mgsoft
First me byst wishes to mr Rao, i did not know he was at hospital. Hope he is ok and we shall see him soon here in this forum.
As per your questions , i do this frequently
1. Load dbf into an array
while ! eof()
aadd(TVISU,{field1,file2,filed3,ctod(field4) ....}) // You can also transform field dates ..etc
Browsing the array
This is a sample where i browse certain fields of the dbf , if you want them all remove the columns syntax
REDEFINE XBROWSE oBrw ID 201 OF ODLG ;
COLUMNS 33,34,4,22,31,23,6,7,8,24,21 ;
HEADERS "Date" + CRLF + "Création","Style", "N°" + CRLF + "Devis","Client","Date" + CRLF + "Impression","Téléphone","Total" + CRLF + "HT","Total" + CRLF + "TTC","Total" + CRLF + "Acomptes",;
" ","Taux" + CRLF + "Tva";
FOOTERS ;
FONT aFont ;
COLORS {|| { CLR_BLUE, CLR_WHITE } } ;
COLSIZES asize ;
array TVISU lines AUTOSORT
In order to read them from last to first
WITH OBJECT oBrw:aCols["Date" + CRLF + "Création"] // example for the first column , i never address acols[1] or whatever, always address the column header definition
:cOrder := If( corder == 'A', 'D', 'A' )
:SetOrder()
END
Hth
Richard