Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Using a Wildcard in a parameter Post Reply Post New Topic
<< Prev Page  of 3 Next >>
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Apr 2009 at 2:08pm
Try and put a () around each part of the statement to make sure they both execute:
(If {?Tech} = 'ALL' Then {Command.TECH} like '*' Else {Command.TECH} = {?Tech})
AND
(If {?Agent}='ALL' Then {Command.AGENT} like '*' Else {Command.AGENT} = {?Agent})
IP IP Logged
bradschi
Newbie
Newbie


Joined: 02 Apr 2009
Online Status: Offline
Posts: 2
Quote bradschi Replybullet Posted: 03 Apr 2009 at 6:32am
Thank you for your fast response.  I Tried to enclose them and no not data is pulled.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Apr 2009 at 6:47am
Sorry, what do you mean by "not data"?
IP IP Logged
kak37
Newbie
Newbie


Joined: 26 Jul 2009
Online Status: Offline
Posts: 1
Quote kak37 Replybullet Posted: 26 Jul 2009 at 3:16pm
worked great, thank u!
 
Clap
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Jul 2009 at 7:05pm
For future views/reference the below should be a more efficient approach:
({?Tech} = 'ALL' or {Command.TECH} = {?Tech})
AND
({?Agent}='ALL' or {Command.AGENT} = {?Agent})
IP IP Logged
zach18
Groupie
Groupie
Avatar

Joined: 08 Feb 2011
Online Status: Offline
Posts: 46
Quote zach18 Replybullet Posted: 09 Jun 2011 at 5:25am
{fpartno} = IIF({?PartNbr} = 'All', '*' , {?PartNbr})

this is what i would hope happened, i tried to use the above solution given on the forum but it didnt work. It was ignoring my time constraints.

this is my complete selection formula:

fpartno} = IIF({?PartNbr} = 'All', '*' , {?PartNbr}) and
{fctime_ts} >= {@StartDate} and
{fctime_ts} < {@EndDate}

this isnt like the solution in the fact that it doesnt use like.

anyone know how to either make the mentioned answer on this forum work with dates or how ot make this way work?
Using Crystal Report 2008
www.zachtech.us
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Jun 2011 at 5:38am
({?PartNbr} = 'All'
or
{?PartNbr}= {fpartno}) and
{fctime_ts} >= {@StartDate} and
{fctime_ts} < {@EndDate}
IP IP Logged
zach18
Groupie
Groupie
Avatar

Joined: 08 Feb 2011
Online Status: Offline
Posts: 46
Quote zach18 Replybullet Posted: 09 Jun 2011 at 5:46am
the problem with what you have is that i need to get all the part numbers. that would have to be a like '*' or something to that effect
Using Crystal Report 2008
www.zachtech.us
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Jun 2011 at 5:58am
{?PartNbr} = 'All' evalautes to true so has no filtering effect which is equivalent to your desired effect
 


Edited by DBlank - 09 Jun 2011 at 5:58am
IP IP Logged
zach18
Groupie
Groupie
Avatar

Joined: 08 Feb 2011
Online Status: Offline
Posts: 46
Quote zach18 Replybullet Posted: 09 Jun 2011 at 6:12am
i guess im missing somthing, could you maybe explain how it being true will help me select every part number in the date range?
Using Crystal Report 2008
www.zachtech.us
IP IP Logged
<< Prev Page  of 3 Next >>
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.047 seconds.