Link to home
Start Free TrialLog in
Avatar of babysnake
babysnake

asked on

crystal reports XI - how to filter the contents of a dynamic combo box in a parameter field

hi

i have 2 fields in seperate tables

one is employee surnames - f_employ.sname

the other is their category - f_cat.value

i set up a parameter field ?name, which is dynamically populated from f_employ.sname, no problem, and i can then base a select record formula on that, get the drop down box, select my name(s) and away we go - so far, so good

the difficulty arises because f_employ.sname contains about 200 values and i am only actually interested in those where the equivalent f_cat.value = 1.0

i can't find a way to limit the drop down box to only those f_employ.sname values that have a corresponding f_cat.value of 1.00 (the 2 tables are linked with an inner join BTW)

does that make sense as a question ?

anyone able to help ??

ta !
Avatar of Mike McCracken
Mike McCracken

You could use a COMMAND for the drop down.

SELECT f_employ.sname
FROM  f_employ inneR JOIN f_cat on f_employ.LinkField = f_cat.LinkField
WHere f_cat.value = 1.0

mlmcc
Avatar of babysnake

ASKER

sounds promising :)

the drop down box is automatically created when i use
f_employ.sname={?name} as a record select formula so that when i refresh the report i then pick from the drop down

where do i enter your command code ?
i've moved on a bit now in that i can derive the exact list of names i need from f_employ.sname formulaically :)

what i now need then is to use that formula to populate a parameter drop down such that it can be used to allow end-users as record selection criteria
Is this a Crystal parameter box or an application?

mlmcc
it's a crystal parameter box

i'm linked to a SQL DB using CR XI and the tables/fields all relate to that one DB

i can't access the DB any other way, and i don't have Server or Enterprise !
The command code is entered in the database expert.

mlmcc
OK

will have a 'play' over the weekend and get back

thanks
couldn't make it work as you suggested mlmcc but i did come up with a workaround

i have seperate report that generates the list i need which i export to excel

then i link that XLS to my main report and base the dynamic parameter on those values

not 100% automatic, but it means updating the list is fairly quick when i have to do it

thanks anyway for your time

ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial