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

CR 8.5 Parameter Field Inputs

Status
Not open for further replies.

Estandridge

IS-IT--Management
Jul 27, 2004
14
US
I have a report that needs to be sorted based off of the users inputs and am trying to figure out a way to do this. Here is an example of what I'm trying to do:

run the report, then the user selects from a drop down box what criteria they want to run the report by (customer name, account number, sales rep, or sales number), then based off of that selection they enter in further information (they select customer name, then a second parameter box asks for them to type in the customer name).

I have tried multiple ways of doing this and for some reason can't get my mind wrapped around it. Any suggestions would be much appreciated!

Thank you
Eric Standridge
 
Are you asking about how to create 'cascading parameters' where the second parameter is presented based on the choice in the first parameter? Unfortunately, Crystal doesn't support this, but there are third party viewer products that do, like the Data Link Viewer. See the LINKS page of my web site for more info.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- TEK2(AT)kenhamady.com
 
If you are willing to use generic text for the prompts, you could use a String parameter that accepts the "field name" ("Customer", "Product", ...). Then use a second parameter that accepts the "field value". Then, use a record selection criterion that based on the "field name" parameter value, checks for a different condition:
Code:
IF {?field_name} = "Customer" THEN 
{Customer} = {?Field_Value}
ELSE
{Product} = {?Field_Value}

If you need a better looking approach, you would need to create your own front-end application to control Crystal.

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thank you both for your help. I've been playing with this for a few days and for now I'll just have to make five seperate reports for each field. I thought about somehow setting it up so that it selects which subreports display, but that's for a later date. Thanks again for all your help!

Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top