on Report if I made
- Code: Select all Expand view RUN
- AAdd(oRep:aGroups,trGroup():New({||oDbf:prov},{||""},{||"Total"},{|| 1 },.t.,oRep))
run ok
but I not Know the field because the final user select the field
So, I calculate from xbrowse the indices and the fields
- Code: Select all Expand view RUN
local aGroup := {}
local aFields := {}
AEval( oBrw:aCols, { |o| If( o:lHide .or. Empty( o:cSortOrder ),, AAdd( aGroup, o:cCbxItem ) ) } )
AEval( oBrw:aCols, { |o| If( o:lHide .or. Empty( o:cSortOrder ),, AAdd( afields, o:cExpr ) ) } )
then the final use select from a combobox the fields want make the group on report
then I make
- Code: Select all Expand view RUN
- AAdd(oRep:aGroups,trGroup():New({||"oDbf:"+(afields[nGroup])},{||""},{||"Total"},{|| 1 },.t.,oRep))
but not run ...why ?