Dynamic create controls in Report


#1

Hi all,

I can use Arc or Line or Box to draw in a report at run time, how can I put string or text box or even image in a report dynamically?

Tony


#2

Like dynamic controls on window.


#3

Look in the help for “CREATE (return new control created)”. You might need to make the report band the parent. If you do have to do that, add a FEQ label to the band. e.g. ?MyReportBand.

Also look at SetTarget(). A report is never the default target, so you have to temporarily set your report as the target.


#4

Also, here’s a “trick” to have the RTL generate a FEQ for you instead of having to specify one.

Pass a zero as the first parameter.

MyFEQ = CREATE(0,CREATE:Text)


#5

Thanks jslarve,

Yes, I have found something on the web which says similar things as yours, and I solved my problem now. The key is:

a# = CREATE(0, Create:String, ?Header)
a#{prop:text} = ‘test’