cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal report - extract part of a string

Former Member
0 Kudos
93

I would like to know how to extract the last part of an paragraph so that it can print it below the 1st part of the paragraph eg.

One (1) Speed Queen Model SCL40KN2 EL x 18 kg Heavy duty industrial microprocessor controlled (self heating) washer extractor. Suitable for 380 volt electicity supply. Machine Dimensions: wxdxh 778mm x 1009mm x 1199mm. Weight: 314 kg

The above description is drawn from a UDF on the item master and prints next to the item picture in the details area of the layout and the customers wants the last 2 lines -

'Machine Dimensions: wxdxh 778mm x 1009mm x 1199mm.

Weight: 314 kg', to print as a new lines underneath like this -

One (1) Speed Queen Model SCL40KN2 EL x 18 kg Heavy duty industrial microprocessor controlled (self heating) washer extractor. Suitable for 380 volt electicity supply.

Machine Dimensions: wxd h 778mm x 1009mm x 1199mm.

Weight: 314 kg

The 2nd last line always starts with 'Machine Dimensions' and the last line with 'Weight'

Is there a way to do this in Crystal, please?

Regards

Danie

Accepted Solutions (0)

Answers (1)

Answers (1)

lovinodo
Explorer
0 Kudos

Hi,

you can consider the symbol '.' as paragraph separator and then trasnform the text wiht a reaplace formula:

Replace ({@Text},'.' ,'.'chr(10)chr(13))

(Chr(13) = Carriage Return;Chr(10) = New Line )