Hi,
I'll try to explain the problem as simple as i can.
Crystal Reprot 8.5, SQL Server.
Tables used
1. Emp
Empid, EmpName, Locationid
2. JobExp
Empid, Comp, Position, Years, Locationid
3. LookupLocation
Locationid, LoactionName
I hope you people understand the link. Any way,
Emp.Empid ----->JobExp.Empid
Emp.Locationid ----->LookupLocation.Locationid
JobExp.Locationid---->LookupLocation.Locationid
The Parameters are :
1. EmpLocation (EmpLoc)
2. JobLocation (JobLoc)
(JobExp table contains same empid with diff.location ids
ie
empid loc.id
111 -- 10
222 -- 22
333 -- 23
111 -- 29
333 -- 29
and in the Emp table locations contains the employee's current location (ie)
(for example empid 111 has 2 loc.id. 10 and 29 emp 111 worked in loc. 29 1/1/00 to 1/1/02 and in the loc.id 10 - 1/1/03 to 1/1/04. Here the loc. 10 is the very recent location)
formula:
(
if ({?EmpLoc} <>"ALL" then
{?EmpLoc}={@EmpLc}
else if ({?EmpLoc} ="ALL" then
true
)
and
(
if ({?JobLoc} <>"ALL" then
{?JobLoc}={@JobLc}
else if ({?JobLoc} ="ALL" then
true
)
The Loc.id form both emp&job tables pointing to the same lookup table(lookupLocation). But we the results as follow:
Parameter 1. EmpLoc --> ALL
and 2. JobLoc --> 29
Output:
EmpName Empid Location (emplocid)
aaa 111 10
eee 333 23
(here we need the current emp location, but the seaching using the JobLoc 29 ) ie only the emp, who has job exp. in location 29; but in the output need to display the current location (may be the same location or different like the emp 111.
Please try to read my explanization, if you need more info. /clarification please let me know.
Thanks
MK
I'll try to explain the problem as simple as i can.
Crystal Reprot 8.5, SQL Server.
Tables used
1. Emp
Empid, EmpName, Locationid
2. JobExp
Empid, Comp, Position, Years, Locationid
3. LookupLocation
Locationid, LoactionName
I hope you people understand the link. Any way,
Emp.Empid ----->JobExp.Empid
Emp.Locationid ----->LookupLocation.Locationid
JobExp.Locationid---->LookupLocation.Locationid
The Parameters are :
1. EmpLocation (EmpLoc)
2. JobLocation (JobLoc)
(JobExp table contains same empid with diff.location ids
ie
empid loc.id
111 -- 10
222 -- 22
333 -- 23
111 -- 29
333 -- 29
and in the Emp table locations contains the employee's current location (ie)
(for example empid 111 has 2 loc.id. 10 and 29 emp 111 worked in loc. 29 1/1/00 to 1/1/02 and in the loc.id 10 - 1/1/03 to 1/1/04. Here the loc. 10 is the very recent location)
formula:
(
if ({?EmpLoc} <>"ALL" then
{?EmpLoc}={@EmpLc}
else if ({?EmpLoc} ="ALL" then
true
)
and
(
if ({?JobLoc} <>"ALL" then
{?JobLoc}={@JobLc}
else if ({?JobLoc} ="ALL" then
true
)
The Loc.id form both emp&job tables pointing to the same lookup table(lookupLocation). But we the results as follow:
Parameter 1. EmpLoc --> ALL
and 2. JobLoc --> 29
Output:
EmpName Empid Location (emplocid)
aaa 111 10
eee 333 23
(here we need the current emp location, but the seaching using the JobLoc 29 ) ie only the emp, who has job exp. in location 29; but in the output need to display the current location (may be the same location or different like the emp 111.
Please try to read my explanization, if you need more info. /clarification please let me know.
Thanks
MK