Quantcast
Channel: SCN : Unanswered Discussions - SAP Crystal Reports
Viewing all articles
Browse latest Browse all 4814

Formula to extract string values from concatenated column value

$
0
0

Hello everyone,

I am trying to make formula where I have to break my data into parts on specific occurrence of characters. I worked on a formula and succeed in breaking the column in to new line. Now I want to extract these break lines of text to use it further.  I tried making the formula where my left first record is extracting before the character '-' for multiple row its not picking the second left first value.

 

For example :

my column: 1.00000-50000000.00000 : 50.00 |

on breaking :  1.00000-

                     50000000.00000:

                     50.00

 

but when my column value exceeds

 

my column : 1.00000-50000000.00000 : 50.00 | 50000001.00000-150000000.00000 : 70.00 |

on breaking : 1.00000-

                    50000000.00000 :

                    50.00

                    50000001.00000-

                    150000000.00000 :

                    70.00 

 

its not picking the next first left value:

                   

 

Split.jpg

 

Formula on left I am using :

 

whileprintingrecords;

stringvar MANG_FEE := cstr({ds_MngFeeComm.MANGE_FEE});

stringVar y := Replace(Replace(Replace(MANG_FEE,'-','-'+CHR(10)),'|',CHR(10)),':',CHR(13));

 

extractstring(y,'','-');

 

formula on right I am using :

 

whileprintingrecords;

stringvar MANG_FEE := cstr({ds_MngFeeComm.MANGE_FEE});

stringVar y := Replace(Replace(Replace(MANG_FEE,'-','-'+CHR(10)),'|',CHR(10)),':',':'+CHR(13));

 

Please help.


Viewing all articles
Browse latest Browse all 4814

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>