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

Dynamic Parameter with Range - Printing on Report

Status
Not open for further replies.

sardine53

Programmer
Jul 4, 2003
79
US
Hi All,

Crystal XI
SQL

I am using a dynamic parameter where the user can select one, more than one, or all values:
CA
WA
NV
AZ
UT
OR
(more states may be added)

In the following scenarios I would like the result to print on the report:

One state (CA) "CA"
Two or more "Multiple"
All "All"

I know how to have all the values print but don't want that, especially if eventually there are all 50 states.

Is this even possible?

Thanks in advance for your help!

- J
 
could you not create a formula field that says something like:

if len({?Param}) = 2 then 'One state'
if len({?Param}) > 2 and < 12 then 'Multiple'
-- you would have to replace 12 with the total number of
--characters when all states are selected
if len({?Param}) = 12 then 'All'
 
I'm getting "A string is required here."

Also:
I would like the state "CA" to print, not "One State"

There may be other instances when I want to use values that are more than 2 digits (San Diego, Oakland, etc.)

Because the users may add/delete the options, I can't use a static number for "All"

Thanks

- J
 
I would create a command that says:

SELECT STATE_NAME FROM SCHEMA.STATE_TABLE
UNION
SELECT 'ALL'
FROM SCHEMA.STATE_TABLE

Then in your parameter editor make sure that you've selected this new command as your data source and also allow multiple values to be selected.

This way you get whatever is entered in the database to populate in your pick list.

I hope this helps.

-SS
 
SS

Thanks for your suggestion but I'm not familiar enough with commands to use that. I would really like to use something more basic (like your first idea--if it had worked).

- J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top