Skip to Content
Former Member
Sep 06, 2013 at 12:13 AM

Extracting characters from a string for grouping purposes


A business student of mine has a specific task he needs to execute in Crystal Reports. I'd imagine there are functions that can act together to accomplish this task, or maybe its even easier than i am imagining. Either way, here is his specific issue (pasted below). Any leads as to how to accomplish this would be greatly appreciated.


We need reports were we group by the middle 2 characters like 03 or the last like 122

The database field is an alphanumeric field of 11 characters (text field) we use numbers only like 08523003122 formatted it stand for 085230-03-122

The first 6 characters are always there the middle 2 can be there or 2 spaces the last 3 are there or not

So like 085230 formatted 085230- -

Or like 085230 122 formatted 085230- -122

Or like 08523003 formatted 085230-03-

So database wise we have 11 characters with grouping on position 7,8 and or 9,10,11