FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Report class : colorize rows RESOLVED
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Report class : colorize rows RESOLVED
Posted: Fri Mar 17, 2023 10:25 AM

how to simulate the pajama effect in oReport printing?

I allready tried this

ACTIVATE REPORT oReport ON STARTLINE AEval( oReport:aColumns, { | o | o:lShadow := ! o:lShadow } )

but not run

I mean one line yes and one no, not all rows

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Report class : colorize rows
Posted: Fri Mar 17, 2023 02:02 PM
Code (fw): Select all Collapse
// C:\FWH..\SAMPLES\PIJAMA3.PRG

// http://forums.fivetechsupport.com/viewtopic.php?f=3&t=37094&p=221399&hilit=zebra+effect&sid=577044adb83956738c9f6497a5c8f33e#p221399

#Include "FiveWin.ch"

FUNCTION PrintZebra()

   LOCAL oPrn, oFont, oBrushColor, oBrush, nRow

   USE STATES
   GO TOP

   PRINT oPrn PREVIEW

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0, -14 OF oPrn
   DEFINE BRUSH oBrushColor COLOR CLR_HGRAY

   PAGE

   nRow := 0.5

   @ nRow, 1.0 PRINT TO oPrn TEXT "EFECTO PIJAMA" SIZE 3.0, 0.3 INCHES ;
      ALIGN "T" FONT oFont COLOR CLR_BLACK, oBrush

   nRow := 1.0

   WHILE STATES->( RECNO() ) < 15 .AND. .NOT. STATES->( EOF() )

      SYSREFRESH()

      @ nRow, 1.0 PRINT TO oPrn TEXT STATES->CODE SIZE 1.0, 0.3 INCHES ;
         ALIGN "L" FONT oFont COLOR CLR_BLACK, oBrush

      @ nRow, 2.0 PRINT TO oPrn TEXT STATES->NAME SIZE 3.0, 0.3 INCHES ;
         ALIGN "L" FONT oFont COLOR CLR_BLACK, oBrush

      nRow += 0.3

      oBrush := IF( oBrush == NIL, oBrushColor, NIL )

      STATES->( DbSkip( 1 ) )

   ENDDO

   ENDPAGE
   ENDPRINT

   RELEASE FONT oFont
   RELEASE BRUSH oBrushColor

RETURN NIL

/*
cAlign:
"TL" : TopLeft
"TR" : TopRight
"T"  : Top Center
"BL" : Bottom Left
"BR" : Bottom Right
"B"  : Bottom Center
"L"  : Left Vert Center
"R"  : Right Vert Center
*/
 
// FIN / END
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Report class : colorize rows
Posted: Fri Mar 17, 2023 04:07 PM
Please I asked. "With Report Class". Not with printer class
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Report class : colorize rows
Posted: Fri Mar 17, 2023 04:43 PM
Silvio.Falconi wrote:Please I asked. "With Report Class". Not with printer class

https://forums.fivetechsupport.com/viewtopic.php?f=6&t=42461&sid=fe44a9df5dc81bf7abb999bb7face9a9

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Report class : colorize rows
Posted: Fri Mar 17, 2023 05:46 PM

I saw It

Not run!!

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Report class : colorize rows
Posted: Fri Mar 17, 2023 09:15 PM
Really, the example of Liñares does not work.

https://www.tek-tips.com/viewthread.cfm?qid=197908
Code (fw): Select all Collapse
ACTIVATE REPORT ::oReport WHILE !::oPrenota:eof() ;
   ON STARTLINE ::oReport:aColumns[ 3 ]:lShadow:= ! Empty( ::oPrenota:DATAPAYED )
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Report class : colorize rows
Posted: Sat Mar 18, 2023 04:41 PM
karinha wrote:Really, the example of Liñares does not work.

https://www.tek-tips.com/viewthread.cfm?qid=197908
Code (fw): Select all Collapse
ACTIVATE REPORT ::oReport WHILE !::oPrenota:eof() ;
   ON STARTLINE ::oReport:aColumns[ 3 ]:lShadow:= ! Empty( ::oPrenota:DATAPAYED )
Regards, saludos.
if you make shadow it can also run ok

I ask zebra effect with Treport
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Report class : colorize rows resolved!!!
Posted: Sat Mar 18, 2023 05:45 PM

resolved!!

thanks to a guardian angel .... who helps me

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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

Continue the discussion