Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Creating parameter with option of 'All' Post Reply Post New Topic
Author Message
Redcraze
Newbie
Newbie


Joined: 05 Sep 2010
Location: Australia
Online Status: Offline
Posts: 4
Quote Redcraze Replybullet Topic: Creating parameter with option of 'All'
     Posted: 05 Sep 2010 at 3:29pm
i HAVE MANAGED TO GET 'ALL' PARAMETER WORKING BY HAVING THE 'ALL' SELECTION FIRST IN THE FORMULA... BUT NOW THE OTHER OPTIONS DON'T WORK SUCCESSFULLY! AAH.

Hi
I have created a parameter called 'Status' with a 'string' value type and have tried to link it to a formula so that users can select 'All' and it will bring up all the values for the table.
There are only 3 possible values: 'A' , 'R', ''.
I have created a formula called 'Status':
if {Relationship.STATUS} in ["A",""] then 'Active & Blank' else
if {Relationship.STATUS} = "A" then 'Active Only' else
if {Relationship.STATUS} = "R" then 'Resigned' else
if {Relationship.STATUS} in ["A","R",""] then 'All'

Then in the parameter I have set the Values as 'Active', 'Active & Blank', 'All' etc...
It will not bring up any records though. I also tried just setting the parameter values using the Set Default Values but it won't work.

Any ideas?

Thanks :)

Edited by Redcraze - 05 Sep 2010 at 4:59pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Sep 2010 at 4:47am
In the select expert try:
 
({?Param}='All')
or
({?Param}='Active & Blank' and {Relationship.STATUS} in ["A",""])
or
(?Param='Active Only' and {Relationship.STATUS} = "A")
or
(?Param='Resigned' and {Relationship.STATUS} = "R")

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