Hi all,
I wrap text on the report in textbox. The length of textbox is limited. Can I dinamicaly change highness of this textbox (in dependence on number of rows in wrapped text)? The solution with max.high textbox isn't usable -it creates blank useless rows.
Martin
0
Comments
e. g. 1st section Textbox shows 1 line, 2nd shows 2 lines, ...
With CurrReport.SHOWOUTPUT you define - according to the length of the text - which section will be shown.
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
1) Approximate the length of text counting chars (for each char have predefined width to add) - for example width of i=x, width o=y...
2) Create OCX wrapper for windows function GetTextExtentPoint or some other and use this for calcualting width of the string...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Many thanx,
Martin
Thanx guys
you cut the string up into bite size chunks (say 80 characters) and put them into a text array. While you are filling this array, you keep score of how many elements you have in an integer variable called something like NumberOfElements.
Next, you insert an Integer dataitem, with a body section that has a text box with your TextArray[Number] as its source expression. OnPreDataItem you do Integer.SETRANGE(0,NumberOfElements), and the dataitem will display your pieces of text without any blank lines.
RIS Plus, LLC
Give it a try!