to make easy some tables printed Iuse the class Tinforme Pubblished by josè luis ( alanit)
viewtopic.php?f=6&t=20860&p=111880&hilit=tinforme#p111880
It run good and it is very easy to use
only I wish inserted new features as colors for the text ( Title , subtitle, footer ) and color for the Grid
to print each column It use simply
RptAddColumn( {bTitulo(::aTitulos,i)},,{bCampo(::aCampos,i)},::aWidth[i],{},{||1},.F.,,,.F.,.F.,)
to make color I use 3 type of Pen and each Pen is definited as
DEFINE PEN ::AoPen1 STYLE ::nPenstilo WIDTH val(::nPensize) COLOR ::nColore OF ::oReport
I put the row in bold ( that not run on report )
REPORT ::oReport ;
TITLE " ",::cTitulo1,::cTitulo2,iif(::cTitulo3!=NIL,::cTitulo3," ") CENTERED;
FONT ::oFont3, ::oFont2, ::oFont1 ;
PEN ::AoPen1,::AoPen2,::AoPen3; --------------not run !!!
HEADER ' ',::cTitleHeader ;
FOOTER ::cTitleFoot, "Data: "+dtoc(date())+ " Página.: "+str(::oReport:nPage,3) ;
CAPTION "" PREVIEW
.....
......
...
IF ::oReport:lCreated
IF ::lGrid
::oReport:SetPenColor(::nColore)------------> not run !!!!
::oReport:CellView()
::oReport:SetShdColor(CLR_GRAY)
ENDIF
::oReport:nTitleUpLine := RPT_SINGLELINE
::oReport:nTitleDnLine := RPT_SINGLELINE
::oReport:oTitle:aFont[2] := {|| 3 }
::oReport:oTitle:aFont[3] := {|| 2 }
::oReport:SetTxtColor(::nColoreFont1,1) ------------> not run !!!!
::oReport:SetTxtColor(::nColoreFont2,2) ------------> not run !!!!
::oReport:SetTxtColor(::nColoreFont3,3) ------------> not run !!!!
::oReport:nTopMargin := 0.1
::oReport:nDnMargin := 0.1
::oReport:nLeftMargin := 0.1
::oReport:nRightMargin := 0.1
::oReport:oDevice:lPrvModal:= .t.
ENDIF
Any solution please ?