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!

Limiting Prompt Drop down list 1

Status
Not open for further replies.

sds786

Programmer
Aug 15, 2007
49
0
0
US
I am working on Crystal 2008 with Oracle database. I need to create a prompt on a table field (string) with drop down field values. There are lots of values sorted alphbetically but I want to see only those values in the drop down list which only start with 'T'. I tried to do with Edit mask option but it did not work, probably I am not sure how to use that.
Any halp will be highly appreciated.

Thanks.
 
You could create a command:

select table.field
from table
where table.field like 'T%'

...and then use this to populate the pick list.

-LB
 
Thanks LB, would you please explain little more, where can I create this command and how can link with my prompt?
 
In the database expert, above the list of tables is the option "Add command". Click on that and then enter your command, something like this in Oracle:

select "table"."field"
from "owner"."table" "table"
where "table"."field" like 'T%'

If you are unsure how to write this, take a look at "show SQL query" and observe the punctuation/syntax there.

This will create a command which you will then access by using the dropdown for "Insert" in the parameter screen. Choose the field to populate your "value" list. Do NOT reference this command anywhere in your main report, and do NOT link it to any other tables, even when you get a warning. Just say "Ok" to the warning.

-LB
 
You are wonderful LB, that worked fantastically:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top