Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Extracting data from a string Post Reply Post New Topic
Author Message
Kwirky
Newbie
Newbie
Avatar

Joined: 21 Apr 2010
Online Status: Offline
Posts: 32
Quote Kwirky Replybullet Topic: Extracting data from a string
     Posted: 05 Jun 2011 at 3:06pm
Hello,
I have a string which can vary in length and I need to split it so that it only shows particular data based on certain words.

Below is an example of the string.

  Description
  G100K5 4/0 660x920
  100gsm Laserbond .
  4 colour process both sides.
  900 X 640.

  MATCHED TO PROOF: this is a test of the PROOF wording

  REPRINT: This is a test of the REPRINT wording

I want to show only the details if they are

MATCHED TO PROOF: this is a test of the PROOF wording

or

REPRINT: This is a test of the REPRINT wording

Sometimes neither of these two lines will be entered by the user, sometimes one or the other, or sometimes both.

I need to show any occurances of the above two lines only.

This is stored in a table called EstDescription.description.

I am using CR2008.

Thank you :)

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Jun 2011 at 7:52am
Not exactly sure what you want here but you could use an instr() or a like to exclude or hide rows of data or to convert it via a formula to show the text you want.
select statement would be like:
 
instr(EstDescription.description,'MATCHED TO PROOF: this is a test of the PROOF wording')>0 or
instr(EstDescription.description,'REPRINT: This is a test of the REPRINT wording
')>0


Edited by DBlank - 06 Jun 2011 at 7:53am
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum