XBrowse 16.04 : bPaintHeader, bPaintFooter, bPaintRow

User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: XBrowse 16.04 : bPaintHeader, bPaintFooter, bPaintRow

Post by nageswaragunupudi »

miragerr wrote:Good morning to all

Mr. Nages it is possible to highlight the summation of a determidado period.

For example, the BPaintRow, show the summation of a given year or month.

I don't know if I was very specific.

I'm waiting.
In the above example, change the function GetData() with this function

Code: Select all

static function GetData()

   local aData    := {}
   local a, n
   local nTot     := 0
   local dDate    := BOM( Date() - 300 )
   local dPrev    := dDate

   for n := 1 to 15
      if n == 15 .or. MONTH( dDate ) != MONTH( dPrev )
         a  := { 1, nil, CMONTH( dPrev ) + STR( YEAR( dPrev ), 5 ), 0, 0, 0, nTot }
         nTot  := 0
         dPrev := dDate
      else
         a  := { 0, dDate, RandomText( 10, 30 ), HB_RandomInt( 100, 300 ), ;
               { 10,20,30 }[ HB_RandomInt( 1, 3 ) ], 0, 0 }
         a[ 6 ] := a[ 4 ] * a[ 5 ]

         nTot  += a[ 6 ]
         dPrev := dDate
         dDate += HB_RandomInt( 5, 12 )
      endif
      AAdd( aData, a )
   next

return aData
 
If you are using FWH18.01 or later, please change
::ReadPalBmpEx --> ::ReadImage
::SayPalBmp --> ::DrawImage
Regards

G. N. Rao.
Hyderabad, India
Post Reply