through a combobox the user selects the index
oDbf:setorder(nGroup)
oDbf:gotop()
nGroup is a number
aGroup := {nGroup}
oBrw:Report( cTitle, , , ;
{ |oRep, oBrw| MySetUp( oRep, oBrw, oDbf ) }, aGroup )
- Code: Select all Expand view
- static function MySetUp( oRep, oBrw, oDbf )
local cFooter := "footer title"
local cTitle1 := "title row 1"
local cTitle2 := "title row 2"
local cLines := cValToChar( oBrw:nLen ) + " lines"
DEFINE FONT oFont NAME 'tahoma' SIZE 0,-9 OF oRep:oDevice
oRep:aFont[ 1 ] := oFont
oRep:nTitleUpLine := RPT_SINGLELINE
oRep:nTitleDnLine := RPT_SINGLELINE
oRep:nTotalLine := RPT_SINGLELINE
oRep:oheader := TrLine():New( {{||cTitle1},{||cTitle2} }, oRep, 0 )
oRep:oTitle := TrLine():New( {{|| cf(date())+"- Pagina : "+Str(oRep:nPage,3)} }, oRep, 2 )
AEval( oRep:aColumns, { | o | o:lShadow := ! o:lShadow } )
oRep:bskip := { || IF(oRep:nCounter % 2 =0 , oRep:lShadow :=.F.,oRep:lShadow :=.T.) }
return nil
I also want to eject the page and make pijama effect but not work
- Code: Select all Expand view
- AEval( oRep:aColumns, { | o | o:lShadow := ! o:lShadow } )
oRep:bskip := { || IF(oRep:nCounter % 2 =0 , oRep:lShadow :=.F.,oRep:lShadow :=.T.) }
on report give me this
it looks like it does the group but then it doesn't, it looks like it's not indexed but actually i index the odbf file but maybe not the oBrw it gets the data from
I tried to add on MySetUp() function also these lines but not work
- Code: Select all Expand view
local cAlias := oBrw:cAlias
IF len(aGroup) > 0
//group
IF lEject
GROUP ON "(cAlias)->"+ltrim(aGroup[nGroup]) ;
HEADER aGroup[nGroup]+" :"+"(cAlias)->"+aGroup[nGroup] ;
FOOTER space(40)+"Total items "+oRep:aGroups[1]:cValue+ ;
" ("+ltrim(str(oRep:aGroups[1]:nCounter))+")" ;
FONT 1 EJECT
else
GROUP ON "(cAlias)->"+ltrim(aGroup[nGroup]) ;
HEADER aGroup[nGroup]+" :"+"(cAlias)->"+aGroup[nGroup] ;
FOOTER space(40)+"Total items "+oRep:aGroups[1]:cValue+ ;
" ("+ltrim(str(oRep:aGroups[1]:nCounter))+")" ;
FONT 1
Endif
Endif
How resolve it ?