Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Optional Parameters Post Reply Post New Topic
Author Message
CrystalSearch
Newbie
Newbie
Avatar

Joined: 31 Jul 2012
Location: India
Online Status: Offline
Posts: 2
Quote CrystalSearch Replybullet Topic: Optional Parameters
     Posted: 31 Jul 2012 at 12:31am
HI,
 
I am developing a report which has five set of cascading parameters. The requirement is user can select any of the parent parameter and its Child parameter respectively. If parent is not selected the Child will not get enabled(Cascading). The report should If any one of the parent is not selected. But i get an error as no value for that particular parameter. How do i make this work.
 
Your valuable suggestions are awaited!!!
 
Thanks
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 31 Jul 2012 at 2:49am
You should set default values for all of the parameters and make them all optional.  Your report would then handle the default value as if it were null when you process the data.
 
-Dell
IP IP Logged
CrystalSearch
Newbie
Newbie
Avatar

Joined: 31 Jul 2012
Location: India
Online Status: Offline
Posts: 2
Quote CrystalSearch Replybullet Posted: 31 Jul 2012 at 6:20pm

Hi..thanks for the reply

But i have already set True for Optional Prompt. Can you elaborate on the default value!!!

Is there anything by which we can handle it in formula's where this parameter is called..???
 
 
Thanks 


Edited by CrystalSearch - 01 Aug 2012 at 12:45am
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 01 Aug 2012 at 2:23am
When you set up a parameter in Crystal, you have the option of setting a default value, for example "All".
 
In your formula, you would do something like this:
 
({?MyParam} = "All" or {MyTable.MyField} = {?MyParam})
 
-Dell
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 01 Aug 2012 at 8:59am
Hi
 
Dynamic Cascading parameters will not have Default values option to define default values.
 
If you are using any optional prompts in your report, you need to handle this in your record selection like ..
 
If Hasvalue({?Parameter}) then {fieldvalue} =  {?Parameter} else True
 
The above condition will check if your parameter contain value or not. If there is no values it will take all values in the above senario.
 
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