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


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Jun 2011 at 6:21am
User has a run time param (?partnmb)
the select statement starts with a paranthed OR statement. In that OR statement as soon as a condition is met it evaluates to TRUE and moves to the next part of the select statement (the AND startdate part).
so when a user selects "ALL" in your param
{?PartNbr} = 'All'  is a true statement which ends the OR. but it does not actually filter your data which is the same thing as selecting all records (but more efficient because it does not have to evaluate each row).
Since the OR statement ended it will now apply your date range criteria.
Does that help?
 
IP IP Logged
zach18
Groupie
Groupie
Avatar

Joined: 08 Feb 2011
Online Status: Offline
Posts: 46
Quote zach18 Replybullet Posted: 09 Jun 2011 at 10:40am
Perfect explanation, that did EXACTLY what i had hoped it would.
Using Crystal Report 2008
www.zachtech.us
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 10 Jun 2011 at 7:57am
If {?Tech} = 'ALL' Then true  Else {Command.TECH} = {?Tech}
OR
If {?Agent}='ALL' Then true Else {Command.AGENT} = {?Agent}
true works as well. use it all the time.
sharona
IP IP Logged
<< Prev Page  of 3
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.012 seconds.