mauri.menabue wrote:hi Silvio
try this
- Code: Select all Expand view RUN
::oBrw:Report( ::cTitolo, .T., .T., { |oRep, oBrw| ::ReportGes( oRep, oBrw ) } )
*-----------------------------------------------------------------------------------------------------------------------
METHOD ReportGes( oRep, oBrw )
*-----------------------------------------------------------------------------------------------------------------------
local oRs := oBrw:uDataSource
local cConti := cValToChar( oBrw:nLen ) + " Conti"
COLUMN TITLE "Codice" DATA ::PrepCnt(oRs:PCO_COD) SIZE 12 SHADOW
COLUMN TITLE "Tipo" DATA oRs:PCO_TIP SIZE 15 SHADOW
COLUMN TITLE "Denominazione" DATA oRs:PCO_DEN SIZE 60 SHADOW
COLUMN TITLE "Classificazione" DATA oRs:PCO_CLA SIZE 20 SHADOW
COLUMN TITLE "Progressivo","Dare" DATA oRs:PCO_DAR SIZE 15 PICTURE "@EZ 999,999,999.99" SHADOW
COLUMN TITLE "Progressivo","Avere" DATA oRs:PCO_AVE SIZE 15 PICTURE "@EZ 999,999,999.99" SHADOW
COLUMN TITLE "Saldo","Dare - Avere" DATA oRs:PCO_DAR - oRs:PCO_AVE SIZE 15 PICTURE "@EZ 999,999,999.99" SHADOW
oRep:oShdBrush := TBrush():New(,nRgb(219,229,241))
oRep:bStartLine := { || oRep:lShadow := (oRep:nCounter % 2 != 0) } // oReport:bSkip := {|| ( oRs:SKIP(), IF(oRep:nCounter % 2 = 0, oRep:lShadow := .F., oRep:lShadow := .T. ) ) }
oRep:bPostEnd := { || oRep:Say( 1, cConti ) }
return .T.
obviously the one shown is a part of the code where there is the call line from the browse and below a method for custom setup.
This should work, you need to set the shadow setting before printing the line using bStartLine instead of bskip
TIA
Maurizio Menabue
Maurizio,
if a column of the xbrowse has been hidden from the end user?
that's why I have the problem of displaying all columns
I wanted something generic to be able to use with all xbrows, in fact for groups ( group On) I make the end user select the group in which to index, for example for the customer.dbf archive it could be the State field
IF I modify this command at pdreport.prg
- Code: Select all Expand view RUN
oColumn := TRColumn():New(aTitle ,;
nCol ,;
aData ,;
nSize ,;
aPicture ,;
uFont ,;
lTotal ,;
bTotalExpr ,;
cColFmt ,;
.t. ,; <----------------------------------(lShadow)
lGrid ,;
nPen ,;
Atail(aReports)[ REPORT ], lCumTotal )
I have this result
the problem is that after each report it will be with the pijama effect because one goes to modify that code
Another solution on
xbrowse class there is the function
MakeRepCol( oRep, oXCol ) there is the call of
RptAddColumn this function ( RptAddColumn) have the 10th parameter
FALSE allways
that's why the pajama effect will never happenAnother solution on the xbrowse class at Method Report we can add a new parameter
- Code: Select all Expand view RUN
METHOD Report( cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF, aCols, lshadow ) CLASS TXBrowse
local oRep, oPrn, oFont, oBold, uRet
local nFor, oCol, uBookMark
local oBrw := Self
local lAddCols := .T.
local nRows, nSel, n
local lEof := .f.
local lSetUpTwice := .f.
local nLevels
local nRowSel := ::nRowSel
DEFAULT cTitle := If( ::oWnd:ClassName == 'TPANEL', ::oWnd:oWnd:cTitle, ::oWnd:cTitle )
DEFAULT lPreview := .T.
DEFAULT lModal := .T.
DEFAULT lShadow := .F. // for original compatibility
so you could put this parameter in the function
MakeRepCol( oRep, aCols[ nFor ], lShadow )then add on makeRepcol line 11672
oCol := RptAddColumn( aHeader, nil ,;
{ bData }, nSize, nil ,;
nil, nil, nil ,;
"RIGHT",
lShadow, .F., nil, ;
nil, nil, ;
nil, nil, nil, nil, nil, ;
nil, nil, nil, nil, nil, nil, ;
nil, ;
XEval( oxCol:nProgTot , oxCol ), aClr )
and so it might work with
oBrw:Report( cTitle, , , ;
{ |oRep, oBrw| MySetUp( oRep, oBrw, oDbf,aGroup,nGroup,lEject,aCampi ) },, , ,
.t. )
but it's just a few ideas, I'm waiting for the solution that Nageswarao will give me
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com