Solved

String Parsing and finding a word in Crystal Report

Posted on 2012-03-29
4
372 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 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