creating LabelBoxes in C/AL Code

Hello! I’m just getting into programming in Navision so i was wondering if there is any way that you can create a series of Labels in C/AL Code? I used to programm in Delphi so i thought that Navision has something similar, like you use a FOR loop and inside the loop you create a new lebel evey time and then place it automaticaly in a section. Is that possible? If it is please help… lp john

Nope! Labels can only be designed at design-time (report designer) and not run-time (CAL Code) Regards, Tarek

And, of course, this not only applies to labels, but to any type of control… [8D]

quote:


Originally posted by lordslayer
Hello! I’m just getting into programming in Navision so i was wondering if there is any way that you can create a series of Labels in C/AL Code? I used to programm in Delphi so i thought that Navision has something similar, like you use a FOR loop and inside the loop you create a new lebel evey time and then place it automaticaly in a section. Is that possible? If it is please help… lp john


You might want to use the FOR loop to load an array or a temporary table. Then make a DataItem with the Integer table as DataItemTable, set a filter on it so that, if the FOR loop generated n array elements (or TT records), only the integers from 1 to n will be processed. On the Integer DataItem, make a body section with a TextBox control with a global variable as SourceExpression; in the AfterGetRecord trigger evaluate that variable with content of Numberth array element (Variable := Array[Numer]). That’s the C/AL easy way! [:D] Anna

thank you for all the help john