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

New to Crystal 11 - need help with criteria and parameters

Status
Not open for further replies.

alwayslrN

IS-IT--Management
Jun 20, 2006
159
US
I've been thrown into the fire and asked to make some reports using Crystal 11. To date I have not used this version. I don't have a book for reference and I do not think Crystal help can help.

I have set up 2 dynamic parameters usings fields from a database. Lets say field1 is Department, field2 Position, and field3 is Employee. Based on the department selected, the the list of positions and employees change on down the line. What if I wanted to return all records, i.e. all departments, all postions, and all employees? How would I handle that?
 
I just realized I asked a very stupid question. I just need to instruct the users to choose ALL for each field. DUH!!
 
Excellent question, and fairly common.

They can use the Select All option within the parameter, or you might use a COmmand Object as the source for the parameter and embed the "...All" choice within using a UNION ALL:

select '...All' as Department, '...All' as Position, '...All' as Employee
UNION ALL
select Department, Position, Employee from table

Then in the record selection code for all, as in:

(
if {?MyParm} <> "...All" then
{table.department} = {?MyParm}
else
true
)

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top