dynamiclly new line in a crystal report field object

my field object in crystal report has the data from my stored proecedure in sql.
I want in my store procedure to be able to say  for example: Name = LastName + Newline  + FirstName
and the crystal report should understand the new line I tried  LastName + chr(10) + FirstName but it doesn't work it works only on formula object  and I want it on a field object that comes from data in sql.
shulamitgAsked:
Who is Participating?
 
cyberdevil67Commented:
I don't understand why you need sql to do this and not the report? I am trying to know what you are trying to achieve here.

Anway the only way that I could think this can be remotely achieved, would be to create a custom formula that would actualy split the string into an array and then display the data the way you then need to.

array = split(Fullname,char(10)) should return an array split by the newline then you can do what you need in the report itself.
0
 
cyberdevil67Commented:
New lines in windows are usually chr(13)+chr(10), but I am not sure that you can do this in the way you want to do it. However what you could do is have a text object with the fields inside the texbox with the newline in the report itself.
0
 
shulamitgAuthor Commented:
I cant do it in the report itself because for what I need is complicatated and I need to do it in the sql if I put chr(10) in sql - the text object shows chr(10) on the report and doesn't look it as a new line.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.