07-21-2009 03:40 AM
Hi there,
I have a little problem with my automatic visualization in DIAdem:
I have a lot of informations saved in different channels.
Some of these informations are just numbers (double), others are strings.
By using @@cht(1,14)@@ the string in line 1, column 14 should be shown as a text.
And it does, but unfortunately, the string is very long and I would like to use automatic line breaks for this string in my report, so it will look just better.
Example:
The string in line 1, column 14 is: "Measurement Informations, velocity, wetting conditions, force developement..."
I would like to have a text in my report like this:
"Measurement informations, velocity,
wetting conditions, force developement..."
Thanks for your help,
Iwo
07-21-2009 11:42 AM
Hello Iwo!
AFAIK is there no build-in command but you can build it as an user command in script like this:
Function WrapText(ByRef Text, ByRef Chars) Dim s Dim Part For Each Part In Split(Text, ",") s = s + Trim(Part) + ", " If len(s) > Chars Then WrapText = WrapText + s + vbCRLF s = "" End If Next WrapText = WrapText + s End Function
In the report you have to change your expression to: @@WrapText(cht(1,14),30)@@
Matthias
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
07-21-2009 11:55 AM
H Iwo,
The only way to get texts to display spanning multiple lines automatically is to use the Text Object control instead of the Text Box control. The Text Object control is very old and honestly a bit quirky, but it does do a great job of spanning multiple lines, and it also gives you the ability to do extra formatting you can't do in a text box. I'm including an example that shows the first value from the 14th channel-- so you see that we can also use standard DIAdem expressions in the Text Object.
Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments