Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Instring Formula Post Reply Post New Topic
Author Message
teenagree
Newbie
Newbie


Joined: 03 Apr 2012
Online Status: Offline
Posts: 4
Quote teenagree Replybullet Topic: Instring Formula
     Posted: 23 Apr 2012 at 12:54am
Hi,
Can anyone help me using an instring formula combined with Not Has value please? I have the list of Parameter's formulae here. I would like to give wildcard characters for C or leave it without supplying any parameters so that it runs for all C values.Please help

(not HasValue({?A}) OR {table.A} = {?A}) and
(not HasValue({?B}) OR {table.B} = {?B}) and
(not HasValue({?C}) OR instr({table.C},{?C})>0) and
(not HasValue({?D}) OR {table.D} = {?D}) and
(not HasValue({?E}) OR {table.E} = {?E})

Thanks
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 23 Apr 2012 at 1:08am

What exactly is the problem?

Maybe you could make the instr function case in-sensitive, like so;
 
instr({table.C},{?C},1)
 
or if that doesn't fix it perhaps just using the like operator may work (I've never tried this so not sure);
 
(not HasValue({?C}) OR {table.C} like "*" & {?C} & "*")
 
Regards,
Ryan.
IP IP Logged
teenagree
Newbie
Newbie


Joined: 03 Apr 2012
Online Status: Offline
Posts: 4
Quote teenagree Replybullet Posted: 23 Apr 2012 at 1:26am
Thanks for the response Ryan.. But this doesnt work.. I am getting this error "This array may be Subscripted For Example Array"
IP IP Logged
teenagree
Newbie
Newbie


Joined: 03 Apr 2012
Online Status: Offline
Posts: 4
Quote teenagree Replybullet Posted: 23 Apr 2012 at 1:28am
In the Filter criteria, I would be specifying either part of the value (eg.,Alpha for Alphabet) or leave it optional parameter to populate for all values. Thats the requirement
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