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!

Select a certain parameter or select all

Status
Not open for further replies.

sniggih

Technical User
Jan 23, 2002
22
0
0
US
I am creating a report that will give the user a prompt to select a specific Dec # or a specific Ccode. Where Dec # is a group of providers and Ccode is a grouping of Decs. The user needs the ability to either select just specific Dec #(s) or Ccode(s) or to see all providers in requested market. How can I set up the parameters and select expert to decide how to perform the required calculation to determine if the user wants to see all providers or just certain providers based on the selected Dec # or Ccode. I will not be grouping the data based on this criterion I will still want to see my information grouped at the provider level. For example let the user select if they want to select XYZ company but still see want to see all of the XYZ locations individually.

I might be able to set up a parameters that will allow the user to put in the Dec# or Ccodes or select an all but I think I might have a problem in that there are numerous dec #s. Both the Dec #’s and Ccodes are added and deleted frequently. Since we would like to make this report a web base report we don not want to have to manually update any parameter selections


 
You have a couple of issues here. First of all make "all" one of you default values. The your record selection formula should look like this:

If {?parameter}="all" then true else
{?parameter}={fieldname}

However you will have to use the record selection formula, not the select expert, to do this.

In terms of dynamic default values, no version of crystal reports supports this option. You would have to write a VB program to populate the default values on demand.

Let me know if you have any questions. Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
If these fields are always filled in, and if they are strings, you could use a selection formula that says:

{Field} like {?prompt}

They would enter a * for all. That would pick up all records that have a value, but it will skip nulls. The advantage is that it might perform a bit faster. However, if you want all to inculde records that don't have a Dec # or Ccode, then you have to use the If-Then that Dgilz mentioned. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top