Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Using multiple wildcards in selection formula Post Reply Post New Topic
<< Prev Page  of 2
Author Message
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 14 Nov 2012 at 11:07am
Originally posted by comatt1

(if LENGTH({?DescWildcard}) - LENGTH(REPLACE({?DescWildcard}, ',', ''))=LENGTH({?DescWildcard}) then
lowercase({POIT.Description}) = {?DescWildcard} else
lowercase({POIT.Description}) in [{?DescWildcard}])

if they delineate with commas this should work

this works with a single parm, if descwildcard always will be matt,been,grease

it will work


(if LENGTH({?DescWildcard}) - LENGTH(replace(REPLACE({?DescWildcard}, ',', ''),' ','*'))=LENGTH({?DescWildcard}) then
lowercase({POIT.Description}) = {?DescWildcard} else
lowercase({POIT.Description}) in [{?DescWildcard}])

I think this may work

Edited by comatt1 - 14 Nov 2012 at 11:10am
IP IP Logged
theotherdodge
Groupie
Groupie


Joined: 17 Nov 2008
Online Status: Offline
Posts: 40
Quote theotherdodge Replybullet Posted: 14 Nov 2012 at 12:02pm
No, still doesn't work.  It will find a single word if that description field only contains a single word such as "wax".  But if it contains "compound wax" it won't find it.
 
Also, if you enter mulitple terms such as "wax,glasses" it won't find anything regardless of the conditions of the description field.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Nov 2012 at 12:03pm
pretty sure the only way is with an array
IP IP Logged
theotherdodge
Groupie
Groupie


Joined: 17 Nov 2008
Online Status: Offline
Posts: 40
Quote theotherdodge Replybullet Posted: 15 Nov 2012 at 2:11am
Well thats a bummer because the application that uses it can't take multiple values for the array.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Nov 2012 at 3:54am
just as a test, can you set the param to accept multiple values and have it function with a direct string match on multiple entries?
IP IP Logged
theotherdodge
Groupie
Groupie


Joined: 17 Nov 2008
Online Status: Offline
Posts: 40
Quote theotherdodge Replybullet Posted: 21 Nov 2012 at 5:39am
DBlank, I don't understand what you are saying...?
 
Our accounting system, which uses Crystal for it's reports will not allow for multiple params...  The only way to possibly use multiple params is to delinate with a comma. 
 
For example:  hat,goggles,ear plug
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 Nov 2012 at 7:33am

when setting up a param you can set the option 'Allow multiple values' to true. However it sounds like you have a custom crystal viever in your app that is preventing that. I was hoping if you set the param up like this you could at least test multiple value without the like statement. Sounds like that is not possible though.

IP IP Logged
<< Prev Page  of 2
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.031 seconds.