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

Selection 'ALL' for parameters

Status
Not open for further replies.

arodri

Technical User
Jul 9, 2010
121
US
Hello,

I currently have a report (Crystal Reports XI) with three groups:
1. Region
2. Total (this is a number calculated in the stored procedure)
3. Employee Name

The parameters for the report are Start Date, End Date, and Region.
In my region paramter, I listed all of our regions so that the user may simply enter the Startdate, EndDate, and whatever region they want data for.

What I need to do is add "ALL" to the list of regions and if the user selects "ALL" from the drop down menu, the report will include all of the regions.
I've done something similar in another report but that included multiple selections and I don't want that in this report. I don't want them to be able to select more than one option, either "ALL" or one of the regions.

Right now I just have {?Region} = {ItemRevenue.Region} in the record selection area, but since "all" isn't one of our regions, adding it to the list in the parameter field won't do it.

Does anyone know how to do this?

Thank you!

 
Hi,
Add All as a choice and test for it this way :
Code:
If  {?Region} = "All'
Then
True
Else
{ItemRevenue.Region} = {?Region}

Place this region test in parens to have it handled as a unit in addition to your other params.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Or even simpler:
Code:
{?Region} = "All" or
{ItemRevenue.Region} = {?Region}
 
Thanks so much Turkbear, that did the trick!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top