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!

Using 3 parameters 1

Status
Not open for further replies.

muhaidib

Programmer
Sep 27, 2005
82
SA
Hi Everybody,
I have 3 groups in a crystal 8.5 report as YEAR, AREA, MEMBER. I have to display following results:
1. All the REGIONS with their MEMBERS for a given YEAR
2. All the MEMBERS for a given AREA for a given YEAR
3. Particular MEMBER for a given AREA for a given YEAR

My following formula achieves first 2 results from above but fails to get third result.

If {?Area} = "ALL"
then GroupName ({sum.Year1}) = {?Year}
else if {sum.Area}={?Area} and {?Member} <> "ALL"
then GroupName ({sum.Name})={?Member}
else if {?Member} <> "ALL" then
GroupName ({sum.Area})={?Area}

I slogged on it for a long time but could not do it. Can someone help me on it?
 
Try the following record selection formula. I removed the Groupname--not sure whether then the parameter datatypes match, but I would change them to match the datatype of the field.

(
{sum.Year1} = {?Year} and
(
(
{?Area} <> "ALL" and
{?Member} <> "ALL" and
{sum.Name}={?Member}
) or
(
{?Area} <> "ALL" and
{?Member} = "ALL" and
{sum.Area} = {?Area}
) or
(
{?Area} = "ALL" and
{?Member} = "ALL"
)
)
)

-LB
 
Thanks a lot, lbass

Your solution worked beautifully.
Meanwhile I continued to work and succeded with following formula:

If {?Area} = "ALL"
then GroupName ({sum.Year1}) = {?Year}
else if {sum.Area}={?Area} and {?Member} <> "ALL"
then GroupName ({sum.Name})={?Member}
else if {?Member} = "ALL" then
GroupName ({sum.Area})={?Area}

Just for your information. Thanks again for efforts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top