Home RAP
New Blog Posts: Merging Reports - Part 1 and Part 2

Finding an object by Name

edited October 2011 in RAP
Hi,

I have a number of DBText objects in my report; let's call them DBText1,
DBText2, DBText3, DBText4.

I want to assign the fieldname property of the object depending on some
criteria. In effect I want to do something like this (as you would do
in Delphi) in a loop:

for i := 1 to 4 do
(FindControl('DBText' + inttostr(i)) as TField).FieldName := 'fld' +
inttostr(i)

I hope I have explained this well enough. Is there a routine in RAP to
find a component based on name when the name needs to be found based on
other criteria?

Thanks

Al

Comments

This discussion has been closed.