Is there a way to default a dynamic cascading parameter to an '*' so that ALL is selected to keep the user from having to scroll thru several of these same type prompts?
Thanks
Not if your parameter's data source is a database field. Two of the limitations of dynamic parameters are that you can't enter a custom value, and you can't set a default value.
If your parameter data source is a SQL Command you can use a UNION to return a value like "*" and put it at the top of the list. That is as close as you can get. But I am pretty sure the user will still have to touch each parameter at runtime.
Another option (starting with CR 2008) is to make the parameter optional and have the "ALL" be whenever they skip that parameter (selecting the [...]). The selection formula would be something like this:
( if not HasValue ( {?Invoice} ) then True else {DB.invoice}= {?Invoice} )
Make sure you put parentheses around the entire IF THEN rule so that the ELSE doesn't get mixed in with other rules.
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
As Ken said, Crystal reports viewer/designer cannot do this. However, optional parameter in 2008 and above will resolve the issue easily.
If you are using earlier versions of Crystal in a desktop environment you can check if a 3rd party viewer can work for you. Some viewers support default values for dynamic parameters. Here is a video to demonstrate this feature:
The video is about 6 minutes and shows a more complex case when the parent parameters are created inside the viewer (they do not exists in the report). The same approach will work on existing parameters.
A free license for the viewer is available from this link:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.