Page 1 of 1

Enhanced groups in report

Posted: Wed Jun 20, 2007 9:34 am
by StefanHaupt
Hello,

I enhanced the class rgoup to have the possibility to get groupheaders with a shadow. Maybe somebody needs it.

When defining a group, just write oGroup:lShadow := .t., then it´s working.

Here are the changes in rgroup.prg:

Code: Select all

.....
 DATA lShadow, oShdBrush             // sh, 20.06.2007
.....


Method New()
...
DEFAULT ::lShadow := .f.
...

Method Header (nRow)
     IF !::lHeader
          RETU .F.
     ENDIF

     IF ::lShadow                             // sh, 20.06.2007
       IF ::oShdBrush == nil
          DEFINE BRUSH ::oShdBrush COLOR ::oReport:nClrShadow
       ENDIF

      // SetbkMode( ::oReport:oDevice:hDCOut, 1 )
       ::oReport:oDevice:FillRect( { nRow,;
                                     ::oReport:nMargin,;
                                      nRow +      ::oReport:aFont[eval(::bHeadFont)]:nHeight,;
                                     ::oReport:nWidth - ::oReport:nMargin},;
                                     ::oShdBrush )
     ENDIF
....
Maybe this is a suggestion for future versions.


kind regards
Stefan