Text wrapping

mco
Member Posts: 5
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
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
-
I think the only way is to define several sections with several textbox hight
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.Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]0 -
Problem is,how can I determine, which from this defided sections/textbox use/display. I can't use metric font (doesn't support desired small font)and non metric fonts have different width - can't count letters.0
-
There are two ways:
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...0 -
Good idea to create OCX with function GetTextExtentPoint
But there is a problem with handle to Device Context of report window. How can I obtain it?
Many thanx,
Martin0 -
Ops, OCX seems to be finished
Thanx guys0 -
or....
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.0 -
Maybe you can use my NDI from the download section. This will give you the possibility of measuring the with and height of a particular string based on the selection of a fontface and fontsize.
Give it a try!0
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