cancel
Showing results for 
Search instead for 
Did you mean: 

Vertically align text in a textbox

Former Member
0 Kudos

Hello,

I am new to Crystal Reports and want to do something as simple as vertically aligning text in a text box. When I go to Format Field all I see is Horizontal alignment.

Is there an easy way to do this?

Thanks in advance!!

Ron

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Maybe I'm misinterpreting your question but.... you can right click on the text box and under the common tab there should be an option called 'Text Rotation'. You should be able to vertically alighn your text using the 90 degree choice.

Former Member
0 Kudos

Hi This is how I have set up vertically aligned text for a report. However this design is lost when the report is opened from the CMC. Report looks ok from the designer and when previewed, but not when opened from CMC. Any suggestions here please?

Answers (1)

Answers (1)

Former Member
0 Kudos

Sorry but nothing is simple. Vertically align text (meaning the direction of the text) is not possible. In charts it will be automatically done but in text boxes it is not possible.

Femke

JWiseman
Active Contributor
0 Kudos

you are correct that this is not simple. however, there is a workaround using a formula instead of a text object.

1) can create a formula that will loop through the database field or string and insert a chr(10) after each character. in the code below just substitute the customer name field for your field or stringvar.

stringvar vfield:= {Customer.Customer Name};

numbervar l:= length(vfield);

while numbervar i < l do

(

i:= i + 1;

stringvar output:= output + vfield<i> + chr(10);

);

output

2) format the formula as a fixed width font such as Lucida Console

3) format the formula so that Can Grow is turned on.

this will work in the designer and in any of the report viewers.

jw