Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Partial selection in selection formula Post Reply Post New Topic
Author Message
jineshtr
Newbie
Newbie


Joined: 04 Jan 2009
Location: India
Online Status: Offline
Posts: 5
Quote jineshtr Replybullet Topic: Partial selection in selection formula
     Posted: 04 Jan 2009 at 10:39pm
Dear all,
 
I have to write a selection formula to select records which is satifying a part of that field..
 
eg, If we have values in filed like APPLE, PURPLE,HUMPLE,PLEASE
 
and if user enter as PL, then report should show APPLE,PURPLE,HUMPLE,PLEASE because all this values having PL in diffrent places, or if user enter PP, only APPLE  has to show?
 
Please help to write a slection formula for thia case..
 
Jinesh
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 05 Jan 2009 at 6:13am
select * from tablename where fieldname like '%PL%'
IP IP Logged
jineshtr
Newbie
Newbie


Joined: 04 Jan 2009
Location: India
Online Status: Offline
Posts: 5
Quote jineshtr Replybullet Posted: 09 Jan 2009 at 8:58pm
Sorry, I don't want to select tables, I have to write the selection formula in crystal report, to filter records with that specific criteria..
 
Jinesh
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Jan 2009 at 7:28am
This might work.
Create a text parameter for input from the end user.
Create a formula field "instr({field to check},{?parameter})".
In you select statement "{Formula field}>0".
IP IP Logged
jineshtr
Newbie
Newbie


Joined: 04 Jan 2009
Location: India
Online Status: Offline
Posts: 5
Quote jineshtr Replybullet Posted: 11 Jan 2009 at 10:18pm

Thank you very much.. it works....

 

Jinesh

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