Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Display data after parameters. Post Reply Post New Topic
<< Prev Page  of 3 Next >>
Author Message
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 19 Jul 2011 at 6:07am
create 2nd formula
(if isnull({test2})

or {test2}=”” then {test2} in [‘I’,’R’,’S’])

in the record selection

if {pam2}='ALL' then true else {formula}={pam2}***

** i think i reversed it in pam1 above
sharona
IP IP Logged
soulsniper
Newbie
Newbie


Joined: 24 May 2011
Online Status: Offline
Posts: 19
Quote soulsniper Replybullet Posted: 19 Jul 2011 at 6:40am
I tired this .. it should've worked just like yours
 
if {?Status; ALL POSSIBLE INPUTS= (I- In use, R- Reserved, S- Spare)}= "I"
then {CIRCUIT.CKSTAT}="I"
else if {?Status; ALL POSSIBLE INPUTS= (I- In use, R- Reserved, S- Spare)}= "R"
then {CIRCUIT.CKSTAT}="R"
else if {?Status; ALL POSSIBLE INPUTS= (I- In use, R- Reserved, S- Spare)}= "S"
then {CIRCUIT.CKSTAT}="S"
else if IsNull ({?Status; ALL POSSIBLE INPUTS= (I- In use, R- Reserved, S- Spare)})
then {CIRCUIT.CKSTAT} in ["I","R","S"]
 
and what happens is all values show for all paramters typed in now.
 
in the report options i only have convert database null values to default values
 
and covert other null values to default values


Edited by soulsniper - 19 Jul 2011 at 6:41am
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: 19 Jul 2011 at 7:29am

it works better if you simplify- isnull gets acknowledged first,

is this your parameter name???
{?Status; ALL POSSIBLE INPUTS= (I- In use, R- Reserved, S- Spare)}
 
 
sharona
IP IP Logged
soulsniper
Newbie
Newbie


Joined: 24 May 2011
Online Status: Offline
Posts: 19
Quote soulsniper Replybullet Posted: 19 Jul 2011 at 8:05am
Yes. Sorry I just changed it cause the stuff is kind of classified. I'll try putting isnull first and get back to you.
IP IP Logged
soulsniper
Newbie
Newbie


Joined: 24 May 2011
Online Status: Offline
Posts: 19
Quote soulsniper Replybullet Posted: 19 Jul 2011 at 8:14am

Same as before, all values show for any parameter given.

IP IP Logged
soulsniper
Newbie
Newbie


Joined: 24 May 2011
Online Status: Offline
Posts: 19
Quote soulsniper Replybullet Posted: 19 Jul 2011 at 8:21am

I know for a fact that it detects "" and can distinguish from input but in this case it doesn't... ill get back to you.

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: 19 Jul 2011 at 8:38am

and isnull is not acknowledged on a parameter level. so your isnull wont work. you can try to use(but dependson the version)

if nothasvalue(parameter)
but that is why i suggested to add ALL
and if paramter='all' then true will retrieve all your values.
so your record selection really only needs to be
 
if {parameter}='ALL' then true else {field}={parameter}
 
just try that
sharona
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Jul 2011 at 10:33am
IMO you generally want to stay away from if then statement in your select criteria
if you are using v 2008 you can leave a param empty
assuminy no entry means all records and an entry means that set you can use
not (hasvalue({?Status; ALL POSSIBLE INPUTS= (I- In use, R- Reserved, S- Spare)})) or {?Status; ALL POSSIBLE INPUTS= (I- In use, R- Reserved, S- Spare)}= {CIRCUIT.CKSTAT}
 
IP IP Logged
soulsniper
Newbie
Newbie


Joined: 24 May 2011
Online Status: Offline
Posts: 19
Quote soulsniper Replybullet Posted: 20 Jul 2011 at 4:24am
nope no v2008 here
IP IP Logged
soulsniper
Newbie
Newbie


Joined: 24 May 2011
Online Status: Offline
Posts: 19
Quote soulsniper Replybullet Posted: 20 Jul 2011 at 4:26am

When i tried adding "all",all inputs gave the same value. I think something is wrong with having two if statements..

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.016 seconds.