Delimiter for Item Extended Description

Sage 2016 SP1   The Extended descriptions are fine.

I need to write a crystal report that uses the Second line of the Extended description.

I am trying to use the Split command and it works for spaces, but I have tried the chr(13)+chr(10)  for line feed and that does not work

I have copied the weird character the displays in DFDM and that does not work.

What is the value/character used in the Extended description file to indicate a new line.

Thank you in advance.

  • 0
    HI, try the formula below.

    If the number of carriage returns >= 2 then it will return the extended item text from the first to the 2nd carriage return. If the number of carriage returns = 1 then it will return the extended item text from the first carriage return to the end of the file. If the number of carriage returns = 0 it will return the entire extended description. Thx John

    ***********************************************************************
    Dim S as Number
    Dim E As Number

    If Length ({CI_ExtendedDescription.ExtendedDescriptionText}) - Length (Replace({CI_ExtendedDescription.ExtendedDescriptionText},CHR(13),"")) >= 2 then
    S = Instr({CI_ExtendedDescription.ExtendedDescriptionText},CHR(13))+1
    E = Instr(S,{CI_ExtendedDescription.ExtendedDescriptionText},CHR(13))
    Formula = Mid({CI_ExtendedDescription.ExtendedDescriptionText},S,E-S)

    ElseIf Length ({CI_ExtendedDescription.ExtendedDescriptionText}) - Length (Replace({CI_ExtendedDescription.ExtendedDescriptionText},CHR(13),"")) = 1 then
    S = Instr({CI_ExtendedDescription.ExtendedDescriptionText},CHR(13))+1
    E = Length({CI_ExtendedDescription.ExtendedDescriptionText}) - S
    Formula = Mid({CI_ExtendedDescription.ExtendedDescriptionText},S,E)

    Else
    Formula = {CI_ExtendedDescription.ExtendedDescriptionText}
    End If
  • 0 in reply to jcnichols
    Thanks for getting me on the right path, but I could have multiple carriage returns and I only wanted line 1, so I created a formula to find the first Carriage return
    Instr ({CI_ExtendedDescription.ExtendedDescriptionText},CHR(13)) and then a second one to pull the left of the Extended description for the Length of my first formula.