Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1671
  • Last Modified:

Auto select all the default values of a parameter when the crystal report is opened

Hello Experts,
I have put a parameter in my crystal report which is a static type and have entered all the possible values of the parameter. It allows multiple values.

When the report runs the parameter is displayed correctly with all the static values allowing users to select all. What I want is that all the values should be selected by default. This will save one step for the user and also he can unselect specific values if required.

How can I auto select all values for the parameter?

Thank you for your time.
Regards,
$wapnil
0
spattewar
Asked:
spattewar
3 Solutions
 
zephyr_hex (Megan)DeveloperCommented:
there is an option "save data with reports" under the File menu.

this will save the data as of the last run.  it does not re-run the report with the default parameters.

as far as i know, you can't run a report without being prompted for the parameters, unless you run the report by supplying the parameters.  there are applications that run crystal reports on a schedule, and these get configured with the parameters which they use to run the report with.

i'm working with an older version of CR, but as far as i know, what i'm saying is true for the version you're using, too.
0
 
mlmccCommented:
There is no way to seelct all values by default in the Crystal parameter screen.

You could add an ALL option to use to select all values. and select that by default.

If you save the report with data when you try to refresh to get new data you will get prompted for new parameter values but the original values will be shown.

mlmcc
0
 
kingjelyCommented:
Hi $wapnil

This is just a suggestion as i do the same thing,

Is your parameter feild your talking about a string?

If it is, go to the select expert>show formular>>> Formular Editor..

and change your statement

FROM

({Tablename.fieldname} = {?PARAMTER}

TO

({Tablename.fieldname} like {?PARAMTER}


Now when you refresh your report use the WILDCARD * FOR ALL

so REFRESH REPORT

Enter Parameter  *

This will pass everything from the field to the paramter so you dont have to go through and select everything.

A step further,
You could then go to the PARAMETERfield righclick EDIT
And add the default value *

This defaults the field to '*' everything.

Hope that helps.
Kj


0
 
spattewarAuthor Commented:
Thanks. All the comments were informative and improved my knowledge.
0
 
BHRCommented:
an additional note on kj's most excellent suggestion:

After you add * to the default value list, while still in the "set default values" window, go ahead and click "define desciption" (button) to add a description such as "All".  Then make sure the Display setting is set to "vaules and description".

This way, the parameter value will appear as "* - All"
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now