Skip to Content

How to get mutiple lines in a field into one line on crystal

Hello,


I am trying to get a report that has the job description listed with other information about our jobs. The issue I am having is the job description field has multiple lines and is formatted as such;

1 QTY to make

2 Second operation

3 third operation


I need it so its a long string that I can edit or just have every line e.g. line 2,3... listed in the group header. I have seen how to use three formulas to achieve this but it is in the group footer. I have also tried my luck a running a loop to no avail. I have tried split with both chrw 10, 13 but I get errors or no data.I have also tried to use sub reports but it didn't get it to work.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Nov 08 at 10:11 PM

    I got it to work by passing a parameter to a subreport that produced the next line of field I was needing.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 07 at 01:56 PM

    Hello Abhilash,

    I can not tell. I have tried to use split with the enter key as a delimiter and I get errors. When I put the field into details it will have a new detail section for each line. I have looked at the sql table and it show each line as a its own row.

    Add comment
    10|10000 characters needed characters exceeded

    • OK, if every line prints on a separate details section, it does indicate that these are separate rows and not a single row separated by line feeds.

      So, are you trying to create a comma delimited string to print on every Group Header?

      -Abhilash

  • Nov 07 at 07:02 AM

    Hi Nolynn,

    Are lines 2 and 3 separate rows?

    Or are they part of line 1 separated by new line feeds?

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 07 at 07:21 PM

    A comma delimited string would be nice. I need it so that all information except the first line (not a priority but would be nice) for a specific job is displayed with the rest of my report.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 08 at 09:23 AM

    Please take a look at the solution I posted here:

    https://answers.sap.com/questions/675367/mulitple-values-in-crystal-report-report-header.html

    This involves using a crosstab to generate the comma delimited string to be printed on the Group Header.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded