In printing an xbrowse I would like to add shadow in the column print if a certain condition exists. Need code for this.
Thanks all
oBrw:Report( 'TestReport', , , ;
{ |oRep, oBrw, oFont| MySetUp( oRep, oBrw ) } )
*-------------------------------------------*
Function MySetUp( oRep, oBrw )
*-------------------------------------------*
Local oFont,i,bTest1,bTest2,nTmpTotal:=0,nRecNo
i:=0
Select AcMaster_ACM
nRecNo:=RecNo()
// Custom Total
bTest1:=dbEval( { || nTmpTotal += AcMaster_ACM->OPENINGBAL } )
bTest2:={ || bTest1}
Select AcMaster_ACM
Goto nRecNo
DEFINE FONT oFont NAME 'ARIAL NARROW' SIZE 0,-9 OF oRep:oDevice
oRep:aFont[ 1 ] := oFont
// Custom Fuction to be executed at end of report
oRep:bPostEnd :={|| TestRepEnd(oRep,i)}
COLUMN DATA { || i++ } ;
TITLE 'Sr#' SIZE 8 GRID
COLUMN DATA AcMaster_ACM->Name,Group_ACM->GRNAME,'' ;
TITLE 'Name','','' SIZE 20 GRID
COLUMN DATA AcMaster_ACM->OPENDATE,AcMaster_ACM->AC_CATGORY ;
TITLE 'Address','' SIZE 30
COLUMN DATA left(AcMaster_ACM->Address,50),Substr(AcMaster_ACM->Address,51,50),'' ;
TITLE 'Address 1','Address 2','' SIZE 20
// Column with Shadow
COLUMN DATA AcMaster_ACM->OPENINGBAL,'','' ;
TITLE 'Opening','Balalnce','' SIZE 20 ;
TOTAL bTest2 ;
PICTURE '@CXZ ##,##,###.##' ;
SHADOW GRID
Return .t.
*-----------------------------------------*
Function TestRepEnd(oRep,i)
*-----------------------------------------*
oRep:lGrid:=.F.
oRep:lShadow:=.F.
oRep:NewLine ()
oRep:SAY(2, "Total no of Ac heads is "+str(--i)) // 2 indicates to report column 2 AcName
oRep:NewLine()
oRep:SAY(2, "Total no of pages")
oRep:SAY(3, oRep:nPage)
RETURN NIL
COLUMN TITLE "Account";
DATA {|| if(gl->title == repli('-', 30), repli('_' , 30), ;
if(gl->title == repli('=', 30), repli('_', 30), ;
left(gl->title,28))) };
LEFT;
SIZE msize2;
GRID
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 63 guests