FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour EasyReport - oER:aSelection
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
EasyReport - oER:aSelection
Posted: Tue Jan 22, 2019 07:32 AM

Hello Cristobal,
I can not find out how items are added to: oER:aSelection.
Can you please help me.
Best regards,
Otto

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: EasyReport - oER:aSelection
Posted: Fri Mar 01, 2019 09:08 AM

Hello to all,
can please help me on that.
Thank you in advance
Otto

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: EasyReport - oER:aSelection
Posted: Fri Mar 01, 2019 03:04 PM
Sorry Otto
I had not seen his post

ERITEMS2.PRG

Code (fw): Select all Collapse
//------------------------------------------------------------------------------

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 (fw): Select all Collapse
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

Continue the discussion