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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limit the number of discrete values in Parameter

Status
Not open for further replies.

herrld

Technical User
May 10, 2001
69
0
0
US
Crystal Dev v9. Microsoft SQL 2005 database.

I have a parameter that allows multiple discrete values (string)
There is no default value for this parameter.

I would like to limit the number of values that the user can enter into this parameter to six.

Can this be done?



Linda
 
You could set up a record selection formula like this:

(
(
ubound({?parm}) <= 6 and
{table.field} = {?parm}
) or
{table.field} <> {table.field}
)

This would return an empty report if more than six values were selected. Then you could add a formula to the report header like this which would either show the selected values or act as an alert:

if ubound({?parm}) <= 6 then
join({?parm},", ") else
"Too Many Options Selected--Please Limit to Six"

You could also add prompt text like: "Please select up to six values."

-LB
 
Thank you!

I will give that a try.

Linda
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top