Hello, I've scoured the boards but can't find (or missed) anything specific to my needs.
I'm using Crystal Reports 2008 and am trying to use mid and instr to extract specific data.
Here is a sample of my code, which works, but doesn't cut off the data at the next space.
if {CAServiceDesk_query.Description} like ["*Size -*"] then mid ({CAServiceDesk_query.Description},instr ({CAServiceDesk_query.Description},"Size -")+6,4) else " "
The problem with my query is that 4 is not always the correct number of characters to return. The length of characters following "Size -" is variable. I would like it to stop at the next space following the data I need, as there are several more lines of data in the memo field following.
Ex: if it pulls MARK, that's good, but if it pulls ED Th ... not good.
Any help would be GREATLY appreciated.
mark
I'm using Crystal Reports 2008 and am trying to use mid and instr to extract specific data.
Here is a sample of my code, which works, but doesn't cut off the data at the next space.
if {CAServiceDesk_query.Description} like ["*Size -*"] then mid ({CAServiceDesk_query.Description},instr ({CAServiceDesk_query.Description},"Size -")+6,4) else " "
The problem with my query is that 4 is not always the correct number of characters to return. The length of characters following "Size -" is variable. I would like it to stop at the next space following the data I need, as there are several more lines of data in the memo field following.
Ex: if it pulls MARK, that's good, but if it pulls ED Th ... not good.
Any help would be GREATLY appreciated.
mark