bsetup of Report

bsetup of Report

Postby Silvio.Falconi » Wed Apr 26, 2023 9:20 am

this is the report from oBrw:report()

Image

I would simply like to have simple and not double lines, a test on the left and the date and page number/pages on the right

bSetUp := < |oRep, Brw, n |

if n == 2

oRep:bSkip := {|| (IF(!oDbf:Eof(),oDbf:Skip(),nil),;
IF(oRep:nCounter % 2 =1 , oRep:lShadow :=.f.,oRep:lShadow :=.t.))}


return nil
endif
return 2
>


oBrw:Report("List", nil, nil, bSetup)

these lines give me error
source\Pcomuni.prg(349) Error E0005 Outer codeblock variable 'OREP' is out of reach

Code: Select all  Expand view

 oRep:oFooter := TrLine():New( {{|| "Page : "+Str(oRep:nPage,3)} }, oRep, 3 )
oRep:bSkip := {|| (IF(!oDbf:Eof(),oDbf:Skip(),nil), IF(oRep:nCounter % 2 =1 , oRep:lShadow :=.F.,oRep:lShadow :=.T.))}
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
User avatar
Silvio.Falconi
 
Posts: 6770
Joined: Thu Oct 18, 2012 7:17 pm

Re: bsetup of Report

Postby Silvio.Falconi » Wed Apr 26, 2023 10:49 am

Image

this last result

but i still have problems
1) the stripes don't have the pajama effect, they are all grey
2) does not recognize "Page : "+Str(oRep:nPage,3)
3) the title line needs to be narrower

oBrw:Report( "Stampa elenco", nil, nil, { | oRep, oBrw, n| RepSetUp( oRep, oBrw, n ) })


Code: Select all  Expand view

static function RepSetUp( oRep, oBrw, n )
     local  csystem:="xxxxxxxxxxxxxxx"
   local  cnomeazienda1:= "aaaaaaaaa"
   local  cnomeazienda2 := "bbbbbbbb"

    if n == 1   // called first time
            oRep:nTitleUpLine := RPT_SINGLELINE
           oRep:nTitleDnLine := RPT_SINGLELINE
           oRep:nTotalLine   := RPT_SINGLELINE
          oRep:nPage      := 0
          oRep:SetShdColor( RGB(243,243,238) )
          oRep:nCounter:= 0
         oRep:CellView()
         oRep:oheader := TrLine():New( {{||cnomeazienda1},{||cnomeazienda2} }, oRep, 0 )
* oRep:oTitle := TrLine():New( {{|oRep|cf(date())+"Page : "+Str(oRep:nPage,3)} }, oRep, 2 )
        oRep:oTitle := TrLine():New( {{|oRep|cf(date())+"- Pagina : "} }, oRep, 2 )
       oRep:ofooter := TrLine():New( {{||" "},{|| "Progetto Magazzino"} }, oRep, 1 )

      return 2   // by returning 2, we are asking for a second call

   else   // called second time after report columns are created

      AEval( oRep:aColumns, { | o | o:lShadow := ! o:lShadow } )
          oRep:bSkip := {|oRep| (IF(!oDbf:Eof(),oDbf:Skip(),nil), IF(oRep:nCounter % 2 =1 , oRep:lShadow :=.F.,oRep:lShadow :=.T.))}


   endif

return nil
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
User avatar
Silvio.Falconi
 
Posts: 6770
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 70 guests