Create textbox,tabel etc with C/AL code

hello guys.. 8)

same like the title,i want to ask about the C/AL code to create textboxt,label to report or form..

reason: so if i update my table then the report (the report 'sourcetable' is from the table before) will updating(field,name etc) themself...
example:something like this--->> NEW report01.textbox
thx b4 :D

Comments

  • Unfortunately C/AL doesn't provide the capability to create controls at run time.
  • oic...so anyone know how to change the property of the textbox when run time
  • what property is "the property"? :mrgreen:
    well, i mean: what property(ies) do you want to change?
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • The properties that can be changed during runtime are limited (and limited to only forms) (talking about labels and textboxes here)

    The Sourceexpression is NOT part of those properties that can be changed during runtime.
    If you want to change the text displayed (because the value suddenly comes from a different table), use a variable on the form itself and assign the new value to it.
    Welcome to C/AL where every variable has to be declared before runtime.
    But that's just because if you write a virus or another piece of code that sucks, you can't erase your tracks.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • Sog wrote:
    If you want to change the text displayed (because the value suddenly comes from a different table), use a variable on the form itself and assign the new value to it.
    this is where i wanted to get :wink: ...and for the other properties, we have to create multiple sections with textboxes with different property values and show/hide those section depending on what you need. (obviously, this is just a workaround, because we ar not changing properties at all :whistle: )
    search mibuso for showoutput, and you should get more informations.
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • thanks guys...
    this solved my question (though,is not really perfectly solved :D)
    :mrgreen::mrgreen:
  • Recommendation: I no longer make printable reports whenever I can avoid them because upgrading them to the RTC will be difficult. I write reports into Excel through Excel Buffer table. Report 113 gives a good example.

    In this case of course every column is added through code and if you automatically would want to export all fields in a table into Excel you could use RecordRef and FieldRef variables to loop through all fields.
  • Recommendation: I no longer make printable reports whenever I can avoid them because upgrading them to the RTC will be difficult. I write reports into Excel through Excel Buffer table. Report 113 gives a good example.

    In this case of course every column is added through code and if you automatically would want to export all fields in a table into Excel you could use RecordRef and FieldRef variables to loop through all fields.

    :thumbsup: :thumbsup: :thumbsup: :thumbsup: :thumbsup:
    AMAZING...that'll perfectly solved my problem...thank u very muchh