Use of macro in browser creation
Posted: Sat Feb 25, 2012 5:09 am
Dear Roger,
I use huge database containing different kinds of monthly data. All fields are named as 'koli01', 'koli02' ....'koli12', or 'neto01', 'neto02',....'neto12'.
I tried to replace extensive and repeating 'DCBROWSECOL ....' with macro operator:
but after forming GetList, GetSet block for a column created with macro (see: GetList [ ,31,1]) is containing uncompiled macro: {{ || &(m->cVar)}, .....} and oBrowse is showing column corresponding to last cVar.
Is there a way to avoid this?
Best regards
JAnko
I use huge database containing different kinds of monthly data. All fields are named as 'koli01', 'koli02' ....'koli12', or 'neto01', 'neto02',....'neto12'.
I tried to replace extensive and repeating 'DCBROWSECOL ....' with macro operator:
Code: Select all
@ 3,1 DCBROWSE oBrowse ALIAS 'MATERI' ;
SIZE 140 , 31 SCOPE FREEZELEFT {1} ;
PRESENTATION aPres
DCBROWSECOL FIELD MATERI->NAZIV ;
HEADER "MATERIAL" PARENT oBrowse FOOTER '1' EVAL { |o| o:colorBlock := dColor };
SORT bSortCol WIDTH 20
FOR i:=12 to 1 STEP -1
m->cVar:='MATERI->skoli'+StrZero(i,2)
DCBROWSECOL DATA {|| &(m->cVar)} ;
HEADER "Količina "+aMes[i] PARENT oBrowse FOOTER StrZero(i,2) WIDTH 10 PRESENTATION bPres PICTURE pic1
NEXT i
Is there a way to avoid this?
Best regards
JAnko