Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

optional parameter issue

Status
Not open for further replies.

rreddy01

Programmer
Apr 18, 2012
15
US
I am trying to create an optional parameter in crystal reports 2008.

There is a parameter field called Name which is given as optional..

if they dont enter anyvalue in the parameter it should pick up ALL values..I have defaulted the parameter to 'ALL' in parameter list but when they want to choose any one value from drop down its not working...

tried this but its still not working.
((not HasValue({?Name})) or ISNULL({?Name}) or {?Name} ='' OR ({AV_ACTIVITY_TIS1.UC02} = {?Name}))

when i try to use the below code its says boolean is required.
(IF not(hasvalue({?Name}) = true) then ({AV_ACTIVITY_TIS1.UC02} = {?Name}) else "ALL")

Any help is greatly appreciated.


Thanks,
rreddy
 
Try

(IF not(hasvalue({?Name}) = true) then ({AV_ACTIVITY_TIS1.UC02} = {?Name}) else True)

The "else true" effectively ignores the filter.

Ian

 
Thanks for your reply and that worked for me.
 
Hi,
while serching how to create optional parameters in Crystal report, I found this thred is very much lelpfull tome. looks like it is working for someone. I wrote this code in Select Expert (CR XI Ver.). but I am getting error as " The ) is missing"

(IF not(hasvalue({?P_Element_2}) = true) then ({v_FRD308R_EN.element_2} = {?P_Element_2}) else true)

I am new need to CR, need help.

I wrote above code in Select Expert. is ths right place? or do we have to write this code in formual field?

my parameter name is Dinamic picklist with Range, currently user is selecting both from and to IDs, I wanted them to make an optional.

-bnr

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top