Solved

String Parsing and finding a word in Crystal Report

Posted on 2012-03-29
4
366 Views
Last Modified: 2012-06-28
Dear Team,

I have a Oracle CLOB field data which looks like this when I take the field using Crystal Report.

This ticket was submitted by aut Event Manager.Stored token values follow:GUID( MKUMAR057 )DOMAIN( TMATLKTWS1APP002 )SERVICE( TWS )ORIGIN( TWS )OBJECT( J15184 )OBJECTCLASS( SQL_W_USATLKIFSSQ32_001 )PARAMETER ( SQLWKYATLAPP002 )OBJECTLOCATION ( Unknown )FREETEXT( TMATLKTWS1APP002 : SQL_W_USATLKIFSSQ32_001 J15184 has abended in TWS schedule SQLWKYATLAPP002 )

If you check the first bracket starts with a word GUID(someID)
Can I return the someID value in the report using a formula.

The total string length might be long but it always starts with "This ticket was submitted by aut Event Manager.Stored token values follow:GUID( MKUMAR057 )

I have tried with Split and Left Function but unable to achieve what I want until now.
0
Comment
Question by:AnandSahoo
  • 2
  • 2
4 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 37784677
I assume for the example you want to return MKUMAR057

Will there ever be ( or ) before the GUID?

Try this

Split(Split({YourField},')')[1],'(')[2]

mlmcc
0
 

Author Closing Comment

by:AnandSahoo
ID: 37786067
No there no ( or ) before GUID.\

I have tested this and its just working fine.

Thank You.
0
 

Author Comment

by:AnandSahoo
ID: 37904034
Dear mlmcc,

The above formula was working till now but sudenly i get some error. It shows some array range error saying value should start from 1 to.......
Can u plz help. The total string size is not always same.it can be of more length but starting format is always same.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 37904383
That means you have a field with no ) or ( in it.
Try this

If InStr({YourField},')') > 0 and InStr({YourField},'(') > 0 then
     Split(Split({YourField},')')[1],'(')[2]
Else
     "No GUID"

mlmcc
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now