EasyReport - oER:aSelection

EasyReport - oER:aSelection

Postby Otto » Tue Jan 22, 2019 7:32 am

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: 6346
Joined: Fri Oct 07, 2005 7:07 pm

Re: EasyReport - oER:aSelection

Postby Otto » Fri Mar 01, 2019 9:08 am

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
Otto
 
Posts: 6346
Joined: Fri Oct 07, 2005 7:07 pm

Re: EasyReport - oER:aSelection

Postby cnavarro » Fri Mar 01, 2019 3:04 pm

Sorry Otto
I had not seen his post

ERITEMS2.PRG

Code: Select all  Expand view  RUN

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

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 view  RUN

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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 79 guests