cancel
Showing results for 
Search instead for 
Did you mean: 

New line after the text

0 Kudos

Hi,

I've a problem with generate pdf or print, spaces or new line after a record are deleted by system.

For example If I have this text "adadasdfadafadsfaddasf     \n" and I generate a pdf the whitespace and newline are trimmed.

It's my mistake or is a normal behaviour?

Thank you for your support.

Kind regards.

Sacha

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Sacha,

The \n is a C++ escape sequence when coding, for Crystal to add a new line you need to use the chr() value in a formula:

"asfdgfafsdgafhafhf " + chr(10) + chr(13) + "aasd"

But when exporting it is normal for CR to trim the string if there is nothing to print after the \n

Or when editing the text object in CR Designer you can add a Carriage return by holding the Shift key and then hit the the Return key.

Also need to check on the option for Can Grow in the object properties.

But in all cases it is normal for exporting to PDF to trim the spaces.

What are you doing this?

Don

0 Kudos

Hi Don,

thank you for your answer.

Sometimes users needs to add a newline to spacing text beetwen two records in a section.

In our db the the text with newline is stored correctly, but when this record is used to print newline and spaces are trimmed.

This is a sample.

Record 1      fdfadsfasdfas(new line not trimmed)
                    fdafadsfasdfdsafdsa (here is the newline trimmed).
Record 2     fdafdsafasdfasdfdsaf

We need to have this situation

Record 1     fdafadsfdasfad

                   fdafadsfdasfadsfas

                   New Line

Record 2    fadsfdsafsadfsadfas

It is possible to have that?

Kind regards.

0 Kudos

Hi Sacha,

We should show you what is in the DB field. Possibly your ODBC Driver is removing the LF/CR

Don

Answers (0)