EasyReport - oER:aSelection

Post Reply
User avatar
Otto
Posts: 6410
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 26 times
Been thanked: 2 times
Contact:

EasyReport - oER:aSelection

Post by Otto »

Hello Cristobal,
I can not find out how items are added to: oER:aSelection.
Can you please help me.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
Posts: 6410
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 26 times
Been thanked: 2 times
Contact:

Re: EasyReport - oER:aSelection

Post by Otto »

Hello to all,
can please help me on that.
Thank you in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
cnavarro
Posts: 6558
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: EasyReport - oER:aSelection

Post by cnavarro »

Sorry Otto
I had not seen his post

ERITEMS2.PRG

Code: Select all | Expand


//------------------------------------------------------------------------------

FUNCTION ToggleItemSelection( nItem, nArea )

   LOCAL nSelSearch := ASCAN( oER:aSelection, {| aVal | aVal[1] = nArea .AND. aVal[2] = nItem } )

   IF nSelSearch = 0
      AADD( oER:aSelection, { nArea, nItem } )
   ELSE
      oER:aSelection := ADel( oER:aSelection, nSelSearch, .T. )
   ENDIF

   MarkItem( oER:aItems[nArea,nItem]:hWnd )
   nAktItem := 0

RETURN (.T.)

//------------------------------------------------------------------------------
 


and

Code: Select all | Expand


FUNCTION InvertSelection( lCurArea )

   LOCAL i, y, nCurArea

   DEFAULT lCurArea := .F.

   FOR y := 1 TO IIF( lCurArea, 1, Len( oER:aWnd ) )

      IF oER:aWnd[y] <> NIL

         nCurArea := IIF( lCurArea, oER:nAktArea, y )

         FOR i := 1 TO LEN( oER:aItems[ nCurArea ] )

            IF oER:aItems[ nCurArea, i ] <> NIL

               ToggleItemSelection( i, nCurArea )

            ENDIF

         NEXT

      ENDIF

   NEXT

RETURN (.T.)
 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Post Reply