Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: How to user Optional parameters in Crystal Reports Post Reply Post New Topic
Author Message
bandarna
Newbie
Newbie


Joined: 02 Oct 2012
Location: United States
Online Status: Offline
Posts: 10
Quote bandarna Replybullet Topic: How to user Optional parameters in Crystal Reports
     Posted: 07 Oct 2012 at 4:33am

Hi,

While searching how to create optional parameters in Crystal report, I found below  thread

 

http://www.tek-tips.com/viewthread.cfm?qid=1685205

 

 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 wrote above code in Select Expert. is this right place? or do we have to write this code in formula field?

 

My parameter name is Dynamic pick list with Range, currently user is selecting both from and to IDs, I wanted them to make an optional.

 
 
I am new need to CR, need help.

 

Thanks

bnr

Regards
~NB
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 07 Oct 2012 at 6:56pm
Hi
 
Optional parameters are interduced in CR2008, You are using CR XI version which do not support this functinality.
 
Below is modified formula and it should be used in Select Expert only.
 
IF hasvalue({?P_Element_2})  then {v_FRD308R_EN.element_2} = {?P_Element_2}
else
true
 
Thanks,
Sastry
IP IP Logged
bandarna
Newbie
Newbie


Joined: 02 Oct 2012
Location: United States
Online Status: Offline
Posts: 10
Quote bandarna Replybullet Posted: 14 Oct 2012 at 7:12am

Sastry,

it is not working,
error message:
A number, currency amount, boolean, date, time,date-time, or string is expected here.
 
I am writing in selectg expert
 
any idea?
 
-nb
Regards
~NB
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 14 Oct 2012 at 7:47pm
Hi
 
It is because, you are on CR XI.   Try to download CR2008 and try optional parameter option.
Thanks,
Sastry
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