Instead just read every line until you come to "-------" at the end of the block. If the line has a number in the first character save the S_No, Instrument, and Amount. Also check for anything following the Amount. Then on each line if there is a ":" save the ReasonType and ReasonDescription by splitting on ":". If it does not have ":" like "Instrument Rejected" just save "Instrument Rejected" in the ReasonDescription. Since you no longer have to look for specific values (Rej Reason, Warning, Etc) you no longer have to code for it and it will return any of the potential lines of text in the Error Description area. This will even sort of handle the case where it wraps.
Thank you very much, i tried the latest uploaded db and it gives me perfect result as i required. I have tried in different scenarios and it gives me the result without any pause.
The report gives a dynamic look and easy to read/
My next steps is to match this data with exactly similar type data. The difference between these two data will tell me what action was taken by users.
I must admit prior to this the data was getting checked the hard way. This is huge time saving and efficient way to check the difference.
So for all the users, this is the work of MajP, who has gone out of his way to give me this solution. I want to thank him from the bottom of my heart and wish you all the very best. Keep up the good work.
Glad to hear it works. Like I said this is the best way to learn. There are definitely some good tricks I learned doing this that I would reuse if ever have to do it again.