dynamiclly new line in a crystal report field object

Posted on 2005-04-18
Last Modified: 2008-01-09
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.
Question by:shulamitg
    LVL 9

    Expert Comment

    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.

    Author Comment

    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.
    LVL 9

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Suggested Solutions

    This article is filled with multiple code samples and explanations for mathematical calculations. They are as follows: 1. General tips 2. Quadratic formula 3. Object collision 4. Projectile path General Tips       Here are some of my tips f…
    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now