Group on Report ( from xbrowse)
Posted: Fri May 05, 2023 9:15 am
I have a field as oDbf:prov
on Report if I made
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
then the final use select from a combobox the fields want make the group on report
then I make
but not run ...why ?
on Report if I made
Code: Select all | Expand
AAdd(oRep:aGroups,trGroup():New({||oDbf:prov},{||""},{||"Total"},{|| 1 },.t.,oRep))
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
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 I make
Code: Select all | Expand
AAdd(oRep:aGroups,trGroup():New({||"oDbf:"+(afields[nGroup])},{||""},{||"Total"},{|| 1 },.t.,oRep))