Hello,
I would like to dynamic add a page to a pageframe, but the problem how to reference to the new added page, because it's not an array?
&& Source
LOCAL lnCounter, laContactpersonen, lcNaam
THIS.oClub.getPersonen(@laContactpersonen) && Array with all people to add, each on a seperate page.
THIS.nAantalContactpersonen = ALEN(laContactpersonen,1) && count the people in the array.
FOR lnCounter = 1 TO THIS.nAantalContactpersonen
lcNaam = "ContactPersoon" + STR(lnCounter) && Name of the new page
THIS.pgfClub.PAGECOUNT = lnCounter + 4
THIS.pgfClub(lnTeller + 4).NAME = lcNaam && Here I got the error that it is not an array?????????? How can I acces it without an array?
WITH THIS.pgfClub
.&lcNaam..PAGEORDER = 2 + lnTeller
.&lcNaam..ADDOBJECT('o' + lcNaam,'CONTACTPERSOON',laContactpersonen(lnCounter,1) && The new page has an custom object myObject, not important
.&lcNaam..&'o' + lcNaam..txtNaam.VALUE = laContactpersonen(lnCounter,2)
.&lcNaam..&'o' + lcNaam..txtTel.VALUE = laContactpersonen(lnCounter,3)
.&lcNaam..&'o' + lcNaam..txtMobiel.VALUE = laContactpersonen(lnCounter,4)
.&lcNaam..&'o' + lcNaam..txtEmail.VALUE = laContactpersonen(lnCounter,5)
ENDWITH
ENDFOR
How to get it work?
Thanks,
Charl
I would like to dynamic add a page to a pageframe, but the problem how to reference to the new added page, because it's not an array?
&& Source
LOCAL lnCounter, laContactpersonen, lcNaam
THIS.oClub.getPersonen(@laContactpersonen) && Array with all people to add, each on a seperate page.
THIS.nAantalContactpersonen = ALEN(laContactpersonen,1) && count the people in the array.
FOR lnCounter = 1 TO THIS.nAantalContactpersonen
lcNaam = "ContactPersoon" + STR(lnCounter) && Name of the new page
THIS.pgfClub.PAGECOUNT = lnCounter + 4
THIS.pgfClub(lnTeller + 4).NAME = lcNaam && Here I got the error that it is not an array?????????? How can I acces it without an array?
WITH THIS.pgfClub
.&lcNaam..PAGEORDER = 2 + lnTeller
.&lcNaam..ADDOBJECT('o' + lcNaam,'CONTACTPERSOON',laContactpersonen(lnCounter,1) && The new page has an custom object myObject, not important
.&lcNaam..&'o' + lcNaam..txtNaam.VALUE = laContactpersonen(lnCounter,2)
.&lcNaam..&'o' + lcNaam..txtTel.VALUE = laContactpersonen(lnCounter,3)
.&lcNaam..&'o' + lcNaam..txtMobiel.VALUE = laContactpersonen(lnCounter,4)
.&lcNaam..&'o' + lcNaam..txtEmail.VALUE = laContactpersonen(lnCounter,5)
ENDWITH
ENDFOR
How to get it work?
Thanks,
Charl