02-10-2011 10:11 AM
I'm trying to display string properties in a 2D table in Report, but all I get is the first 7 characters in the string, even though there is plenty of room in the "cell" for more characters. Is there a setting to increase the number of character shown in a table?
Solved! Go to Solution.
02-11-2011 01:16 AM
Hi Steve,
It sounds like you should change the table column font from automatically adapting (the default) to a static size. You should also look for the column with the widest texts (date/time?) and make sure it's wide enough-- that may be enough to fix the problem without changing the auto-font setting.
The other possibility that occurs to me is that your table column values could have unprintable characters in them (like a null string or carriage return), which will make the rest of the the column value disappear.
There is no "maximum number of characters" setting for table column values, so that's not what's causing this.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
02-11-2011 09:45 AM
Brad,
I took off the Automatic font size for the table, and changed the font to 2 different sizes. Both sizes look like they have more than enough room to fill the cell, and the data type is just String. The cells that read "Heavy D" should say, "Heavy Duty". See attached screenshots.
Steve
02-11-2011 09:53 AM
Also, the expression I'm using to display the values in the table is:
"@@Str(Data.GetChannel(""["" +str(D2TabRow)+ ""]/MoistureRemoved"").Properties(""Cycle_Tested"").Value, ""AutoAdj"")@@"
Is it the "AutoAdj" part that's foiling my plans? I looked up the "Str" function in the help file, and it looks like I can use a variable to define the length of the string in there, but shouldn't "AutoAdj" account for varying lengths of strings and not just cut off at 7 characters?
02-11-2011 09:57 AM
Okay, I was able to fix it by changing "AutoAdj" to "L:15". That gives me enough room to put up to 15 characters and doesn't give me errors if I go below 15. Thanks for the help!
02-11-2011 12:59 PM
Hi Steve,
The "AutoAdj" format option was designed to display numeric values the way most humans want to see them:
3.1415 ==> 3.1415
2.1200 ==> 2.12
50.000 ==> 50
If you're wanting to display string data in the table cell, you should use a different format string designed to show strings in the particular way you want-- which it sounds like you've already done. I just wanted to explain that this "AutoAdj" format option is primarily designed for displaying numeric information.
Brad Turpin
DIAdem Product Support Engineer
National Instruments