×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Strange carriage return in @text(rtf)?

Strange carriage return in @text(rtf)?

Strange carriage return in @text(rtf)?

(OP)
I have multiple RTF fields on a form which I combine in a single hidden computed plain text field for displaying in a view (as RTF fields cant be displayed in a view). The plain text field computed value code is something like this:


a := @Text(Item1Qty) + " " + "x" + " " + @Text(QuoteItem1);
b := @If(Item2Qty="" ; "" ; ";" + @NewLine + @Text(Item2Qty) + " " + "x" + " " + @Text(QuoteItem2));
c := @If(Item3Qty="" ; "" ; ";" + @NewLine + @Text(Item3Qty) + " " + "x" + " " + @Text(QuoteItem3));
d := @If(Item4Qty="" ; "" ; ";" + @NewLine + @Text(Item4Qty) + " " + "x" + " " + @Text(QuoteItem4));
e := @If(Item5Qty="" ; "" ; ";" + @NewLine + @Text(Item5Qty) + " " + "x" + " " + @Text(QuoteItem5));
f := @If(Item6Qty="" ; "" ; ";" + @NewLine + @Text(Item6Qty) + " " + "x" + " " + @Text(QuoteItem6));
a + b+ c + d + e + f


This works but in the output there appears to be a carriage return at the start of the converted RTF field?

For example the result I get is:

2 x
This particular item;
3 x
Another particular item;
1 x
Yet another item

Where as it should be:

2 x This particular item;
3 x Another particular item;

..etc

I cant work out why there is a carriage return displaying before the "QuoteItem#" fields?

On a related note - is there a way to display carriage returns in a view? When the above text field is displayed in a view there are no carriage returns at all - its just one single line of text.

RE: Strange carriage return in @text(rtf)?

If you use @newline in the view, it should work.
As for your carriage return problem, maybe you could add a @trim to the @text and see what happens.

Pascal.

RE: Strange carriage return in @text(rtf)?

(OP)
Yeah I have tried @Trim but it doesnt appear to make a difference? I did manage to solve it though by using


a := @Text(Item1Qty) + " " + "x" + " " + @Text(QuoteItem1);
@ReplaceSubString(a;@NewLine;"")


I still have no idea where the carriage return came from though?

I still cannot get @NewLine to work in a view column - is it possible to have a carriage return in a view column?

RE: Strange carriage return in @text(rtf)?

Do the view properties allow for more than one line per document ?

Pascal.

RE: Strange carriage return in @text(rtf)?

(OP)
I have rows set to a height of 4 lines and the "shrink rows to content" checked.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close