Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2011
    Posts
    11

    Unanswered: Pull part of a string into a report.

    I'm new to crystal reports and have recently moved information that I use to maintain in a spreadsheet into an ODBC databse that is connected to CR10. Previously I was able to seperate the info in excel with the "text to columns" button using the 'space' as a delimiter. Is there a formula that I can use to identify the space delimiter? Once I've parsed the string, I would like to build a formula that adds the qty of like drum sizes. Ultimately, I am pulling a report from a shipping table to gather metrics on the number of different size containers being shipped each day. Unfortanately this information is kept in a text string.

    the table field I'm pulling from is {lineitem.adddescrip} and the line items look like this:
    The profile id is followed by the quantity of containers shipped x container size.

    X28342 1x30 2x15 2x55
    H50108 1x5 1x30
    H50108 1x10 1x20
    X99293 10x5 5x55

    I want to be able to ignore the first profile id and just pull the container information into a report like this (summing 'like' container sizes):
    7x55
    2x30
    1x20
    2x15
    11x5

    Any help is greatly appreciated.
    Last edited by dbk412; 11-05-11 at 21:26.

  2. #2
    Join Date
    Oct 2010
    Posts
    46
    You need to do basic string parsing to retrieve the text that you wanted.

    From the sample data you provided, it appears that you need to:

    1. Look for the first " "
    2. Substring the part of text from the first " " to the end of text
    3. Repeat for the next " " until the field is completely parsed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •