Crystal Reports: Add a Line Break in a Formula Field

If you need to add a line break in a formula field just use the ChrW function which “returns the single character text string associated with the Unicode value passed in” with the value of 13. The Unicode value associated with 13 is the carriage return.

// Formula Field Code
"This formula field " + ChrW(13) + " contains a line break!"

// Output
// ------
// This formula field
// contains a line break!

10 Responses to “Crystal Reports: Add a Line Break in a Formula Field”

  1. Naser Says:

    Very good man.

  2. Zach Says:

    This is great, i have been trying to figure out line breaks for a while now. i have been doing it with SQL, but this is easier.

  3. Jose Gonzalez Says:

    Excellent. Thanks!

  4. Zee Says:

    Nice Article…
    But suppose I have multiline text box & I want to display the multiline text in formula field.How should i do.
    I tried doing it but giving error missing “”
    I am using c#

  5. Tom Says:

    Zee: I think this solution is only for Crystal Syntax or Crystal Basic Syntax
    Nick: It works great for me. Thank you for the tip

  6. ganesh Says:


  7. Deepak Says:

    Nick : Excellent
    And thank you

  8. Jon Says:

    It may work for the current version. I tried on an old version at 8.5 and it did not recognize it. But this is good to know. Thanks.

  9. Fernando Herrera Says:

    Thank you so much!

  10. Ram Says:

    Good Work,Thank you very much

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: