Hi All,
With this post I would like to group all working ways how to display the header names having Vertical text orientation.
If you search within the Web you should easily find the idea to decrease the column width and to use Word wrap property as well but I don’t think that this is good enough, at least for me, as the cell data in the table body is wrapped as well.
Using HTML is not working for me either.
So I found this formula somewhere in the forums:
=Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace([MyDimension];“a”;“a”+Char(10));“b”;“b”+Char(10));“c”;“c”+Char(10));“d”;“d”+Char(10));“e”;“e”+Char(10));“f”;“f”+Char(10));“g”;“g”+Char(10));“h”;“h”+Char(10));“i”;“i”+Char(10));“j”;“j”+Char(10));“k”;“k”+Char(10));“l”;“l”+Char(10));“m”;“m”+Char(10));“n”;“n”+Char(10));“o”;“o”+Char(10));“p”;“p”+Char(10));“q”;“q”+Char(10));“r”;“r”+Char(10));“s”;“s”+Char(10));“t”;“t”+Char(10));“u”;“u”+Char(10));“v”;“v”+Char(10));“w”;“w”+Char(10));“x”;“x”+Char(10));“y”;“y”+Char(10));“z”;“z”+Char(10));“A”;“A”+Char(10));“B”;“B”+Char(10));“C”;“C”+Char(10));“D”;“D”+Char(10));“E”;“E”+Char(10));“F”;“F”+Char(10));“G”;“G”+Char(10));“H”;“H”+Char(10));“I”;“I”+Char(10));“J”;“J”+Char(10));“K”;“K”+Char(10));“L”;“L”+Char(10));“M”;“M”+Char(10));“N”;“N”+Char(10));“O”;“O”+Char(10));“P”;“P”+Char(10));“Q”;“Q”+Char(10));“R”;“R”+Char(10));“S”;“S”+Char(10));“T”;“T”+Char(10));“U”;“U”+Char(10));“V”;“V”+Char(10));“W”;“W”+Char(10));“X”;“X”+Char(10));“Y”;“Y”+Char(10));“Z”;“Z”+Char(10));" “;” “+Char(10));“0”;“0”+Char(10));“1”;“1”+Char(10));“2”;“2”+Char(10));“3”;“3”+Char(10));“4”;“4”+Char(10));“5”;“5”+Char(10));“6”;“6”+Char(10));“7”;“7”+Char(10));“8”;“8”+Char(10));“9”;“9”+Char(10));”-";"-"+Char(10));"";""+Char(10))
It simply replaces every character in [My Dimension] dimension object with the same concatenated with the new line character Char(10). This works fine for me.
BUT as it is working only for the English letters and I’m having a Japanese customer then I have had to think of a way to make it work for any letter. But the Japanese/Chinese/etc. alphabets are having much more than 26 letters. So I did just this simple idea - get the value and add Char(10) to the string.
This is quite easy in a normal function with a loop but in BO there are no loops…
So here is how I did it:
STEP1:
Create a new Dimension variable (a dummy one for the test) called [Text], type String, Formula =“Simple text” (or any text having special characters or symbols).
STEP2:
Create a new Dimension variable called [1], type String, having formula
=(Substr([Text];1;1)+Char(10))
STEP3:
Create new Dimensions like [1] called [2], [3], etc. at least 10 or 20 of them. Each one of them is needed for the loop and the number depends on that how long the displayed text would be.
Keep this logic:
Name: n
Qualification: Dimension
Type: string
Formula: =[n-1] + (Substr([Text]; n; 1) + Char(10))
Here is an example of that how Variable [5] should look like:
=[4] + (Substr([Text]; 5; 1) + Char(10))
STEP4:
Create new Dimension called [L]=Length([Text]) - you need to know how many characters are there in [Text].
STEP5:
Create New Dimension called [Display], type String, Having the formula:
=If [L]=1 then [1]
ElseIf [L]=2 then [2]
ElseIf [L]=3 then [3]
ElseIf [L]=4 then [4]
…
and so on! If you want to capture up to 20 characters then you’ll have to create 20 dimensions ([1]; [2]; …; [20]) and the formula of [Display] should be ending with
ElseIf [L]=20 then [20]
Hope this post will help somebody with his tasks.
Please share your thoughts if any.
Thanks,
Svet
svelikov (BOB member since 2009-08-19)