Print Page | Close Window

Pulling Out Specific Imbedded Data

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21698
Printed Date: 28 Apr 2024 at 10:07am


Topic: Pulling Out Specific Imbedded Data
Posted By: Dejaneira
Subject: Pulling Out Specific Imbedded Data
Date Posted: 25 Sep 2015 at 11:51am
I need to pull out some data in the middle of a string and then group on that data. Trouble is the text in the different areas can change depending on where the data is being pulled from. I need to group on the bold area below that always ocurrs within the [] after the : with the caveat that the () before and after may or may not be there. Confused
Anyone got any ideas?
 
Sample 1--> (KCI)[Inv Num: T2-1207846](Payroll Expense Transfer)
Sample 2 --> [PCO Num: 0002](Supervision)



Replies:
Posted By: praveeng
Date Posted: 28 Sep 2015 at 12:38am
Hi,


Use below code to achieve your requirement.


Mid({Database_Field},InStr({Database_Field},":")+1,(instr({Database_Field},"]")-InStr({Database_Field},":"))-1)

--Praveen G

-------------
Praveen Guntuka,
praveen_guntuka@yahoo.com


Posted By: Dejaneira
Date Posted: 30 Sep 2015 at 7:38am
You are awesome and I have a whole division of people who thank you!



Print Page | Close Window