Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: print data btween two brackets Post Reply Post New Topic
Author Message
ankita
Newbie
Newbie


Joined: 13 May 2011
Online Status: Offline
Posts: 37
Quote ankita Replybullet Topic: print data btween two brackets
    Posted: 04 Apr 2012 at 5:59pm
 
Hi All,
 
Please tell me if i want to print only Deepika Katoch from below data in crystal report. How to do it.
 
 
Thanks in advance
 
 
*** 04/04/12 11:11:19(Deepika Katoch) ***
Kindly do the needful.
 
 
Regards
Ankita
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 05 Apr 2012 at 5:16am
local stringvar ls;
local numbervar x;
 
x := instr({table.field}, "(");
if x>0 then
 ls = mid({table.field}, x+1);
 
x := instr({table.field}, ")");
if x>0 then
 ls = left(ls, x -1);
 
ls
 
HTH
IP IP Logged
ankita
Newbie
Newbie


Joined: 13 May 2011
Online Status: Offline
Posts: 37
Quote ankita Replybullet Posted: 08 Apr 2012 at 5:25am
Hi
Thnaks for your kind reply but its not wokring its retruning true value ....
 
 
 
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 09 Apr 2012 at 3:18am
I think a see a few oops...sorry bout that
 
local stringvar ls := {table.field};
local numbervar x;
x := instr(ls, "(");
if x>0 then
ls = mid(ls, x+1);
x := instr(ls, ")");
if x>0 then
ls = left(ls, x -1);
 
ls;
 
try that instead
 
IP IP Logged
ankita
Newbie
Newbie


Joined: 13 May 2011
Online Status: Offline
Posts: 37
Quote ankita Replybullet Posted: 09 Apr 2012 at 4:50pm
Thanks for your reply


#################################
*** 19/01/11 14:06:07(Aneesh Arjun) ***
User has been requested to reinstall teradata database.Same has been done and now it is working fine
*** 19/01/11 12:26:29(Aneesh Arjun) ***
need to reinstall teradata
*** 19/01/11 12:25:19(Aneesh Arjun) ***
tera data reinstallation
*** 19/01/11 12:20:23(Sumit Singh) ***
please check.
##################################



But still i am getting like this
*** 19/01/11 14:06:07(Aneesh Arjun) ***

I want only aneesh Ariun in this.






IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 10 Apr 2012 at 7:53am
you'll have to debug what I did wrong.
 
standard way to check is to break the formula into one or more new formulas and display only part and check that the output of the formula matches what you want it to.
 
for example, create a formula with this in it:
local stringvar ls := {table.field};
local numbervar x;
x := instr(ls, "(");
x
 
and see if the value display matches the location of the "(", if the value is 0 and there is a ( in the field then replace the last x with ls and see if the column is correct. If everything matches, add another line in and see if the results of that line match with expectations.
 
HTH
 
OK, I see what I did wrong... should be ls := xxx
 
:= is the assignment operator, = is the comparator.


Edited by lockwelle - 10 Apr 2012 at 7:54am
IP IP Logged
ankita
Newbie
Newbie


Joined: 13 May 2011
Online Status: Offline
Posts: 37
Quote ankita Replybullet Posted: 10 Apr 2012 at 8:39am
Thnaks al lot alot

IT worked
Thnaks
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.014 seconds.