Create textbox,tabel etc with C/AL code

knolvsky
Member Posts: 10
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
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

0
Comments
-
Unfortunately C/AL doesn't provide the capability to create controls at run time.0
-
oic...so anyone know how to change the property of the textbox when run time0
-
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.0 -
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.
...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.0 -
thanks guys...
this solved my question (though,is not really perfectly solved)
0 -
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.0 -
Miklos Hollender wrote: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 muchh0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions