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!

How to pull in a text list

Status
Not open for further replies.

TammyT

Programmer
Sep 17, 2003
183
US
It's been too long since training! I know (I hope!) there is a way to use a preset list (such as the states) in the select expert "is one of" choice - I just can't remember how to create/pull it in! Does this make sense?
 
I did some more checking - I found where to pull in the list (as a parameter); however, I still can't get it to choose as "is one of" in the select expert. The field is AssignmentGroup; the name of the parameter in this report is Tier2, & it contains all of our Tier2 Assignment Groups, by name (obvious, huh?!). However, when I go the Select Expert for that field, choose "is one of", & then go into the Formula Editor & put the parameter name inside the [ ], the report seems to die - is it trying to pull a record where the assignment group is equal to all of the names in the Tier2 list? Or is it just that it's going to take a long time to pull the data? I really suspect something is wrong!
 
PArameters are NOT dynamic in Crystal, which is an incredible shortfall which Crystal has ignored for many versions.

You can preset the values the user can select from, which in the case of states, you should be fine.

When creating the parameter, select Set Default Values->select from database->Browse Table->(select the table)->Browse Field->(select your state field)->Select the >> button and the parameter will now have a pull down for the user of those STATIC values, it will not automatically update.

-k
 
I don't want the user to select anything; it needs to pull the data where the Assignment(group) is any of those names in the list - I just need 1 "global" report, not by group. Is there anyway to do that without typing each AssignmentGroup name in, by hand, in the "is one of" list?! Please say there is a way!! =)
 
You would do this using SQL, not by using the select expert nor a parameter.

Try posting your version of Crystal and the database being used (this is always useful when posting).

An example would be:

select table1.state where
table1.state in (select state from table2)

How you might do this will be dependent upon the version of Crystal and the database being used.

-k
 
If you use the select expert and choose "is one of", you should have a drop-down list available to you on the right, so that you can add the values you want. But you could just bypass the select expert and go to report->edit selection formula->record and enter formulas like:

{table.string} startswith "A"

Maybe it would help to explain a little about the field you want to select from.

-LB
 
The Db we are pulling from doesn't appear easily in the drop down for "is one of" - we're using ServiceCenter by Perrigrine, & it generally causes Crystal to crash when we try to use the drop down! Actually, I found a field in the Assignment group table for putting in Type; not being used currently, but the easiest solution is to have that become a mandatory field, fill it in for the 50 or so existing records, & then use that as the deciding field for the report: type = tier2 for 1 report, type = tier3 for the other, then I will get the exact info I need.

Thanks to all for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top