If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Crystal Reports > Delete everything left of a semicolon....

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-31-09, 18:24
torgerjl torgerjl is offline
Registered User
 
Join Date: May 2009
Posts: 2
Delete everything left of a semicolon....

I am new to this and I have two questions/issues. I have this code:
stringVar CallMemo;
CallMemo := {tbl.col};
Right(CallMemo, InStr(CallMemo, ";") -1)

How I would like it to function is to delete everything before the first semicolon and leave the rest of the memo field. Instead I get the bottom part of the memo field - whatever the instr count is obviously (not all the remaining text after the first .

Also, is there a process that can be incorporated to ignore a memo field if it does not start with a left bracket and contain a semicolon?

thank you!
Reply With Quote
  #2 (permalink)  
Old 06-01-09, 12:33
Srinvb Srinvb is offline
Registered User
 
Join Date: May 2009
Posts: 5
Thumbs up

I think you can use MID function i.e MID(String,Start,LEN),So your code can be written as
stringVar CallMemo;
CallMemo := {tbl.col};
MID(CallMemo, InStr(CallMemo, ";") +1)
this would consider the string from the first ";".
for the Second issue ignore meaning you want to suppress ?
if you want to suppress then right click on the field and suppress (formula)
MID({field},1,1)<>"(" and instr({field},";")<=0
this formula would check if the memo field contains "(" as the first character and the INSTR will check if the field contains ";" .if both conditions satisfies the n the field will be suppressed.

try the solutionl.
Reply With Quote
  #3 (permalink)  
Old 06-01-09, 13:46
torgerjl torgerjl is offline
Registered User
 
Join Date: May 2009
Posts: 2
I did up using the MID code without a variable. I will try the supression, thanks!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On