Click here to Skip to main content
16,007,277 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to print report like following:

108,xyz
pqr road,
xyz nagar

It is stored in sql database with CR, but when I print it in Crystal report data is (without line break)

108,xyz pqr road, xyz nagar.


How can I put line break.

In my table , i take address column with varchar(250)

any hint will be appreciated.


Hardik Shah.
Posted

1 solution

If the data is standard and you can always replace a space in the data with a line break, you can probably write some crystal script to do it. Try researching how to create a formula field [^]in crystal. Then using the Formula Workshop Formula editor screen, look under the String functions category for the Replace function. Your formula would be something like this:

Replace({Table.Field}, ' ', CHR(13))


I'm not sure if it's single quotes or double quotes to find the space and I'm not 100% sure the CHR(13) works for the carriage return line feed. But if you need more specifics you can probably find the correct syntax via google.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900