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

Record Selection Formula Help

Status
Not open for further replies.

devnaren

Programmer
Aug 23, 2007
49
US
Hi,

I created report in which it prompts to enter three parameters.

1. Enter Departments (its a dynamic)

2. Enter Employee ID (its a static)

3. Enter Description (its a static)

My question is that is there any way to filter only Employee ID.

without selecting the Departments which is dynamic parameter.

 
Are these distinct parameters or cascading?

-LB
 
My question is:

If user want to see all the employees in particular Department which is dynamic parameter, he can select any one of the department from the drop down list and he can see the employees in that department.

If user want to see particular employee by entering is EmployeeID in EmployeeID parameter.(Here the user don't know that which department this employee belongs to. So he wants to go with by entering just EmployeeID.

Here i'm confused about how to write a record selection formula, if user is not selecting department(which is dynamic LOV) and by just entering the employeeid(which is static).



 
Create a parameter {?TypeofSelection} with options "By Department" and "By Employee ID". Then use a record selection formula like this:

(
{?typeofSelection} = "By Department} and
{table.dept} = {?Department}
) or
(
{?Type of Selection} = "By Employee ID" and
{table.empl} = {?EmployeeID}
)

-LB
 
I created a parameter as Type of Selection and in that i entered two values as By Department and By Employee ID.

when i tried to run the report by selecting type of selection parameter as By Employee ID and i entered Employee ID without selecting anything in Department.

But still its giving an error as the value is not valid in the Department parameter which is a dynamic.


 
It doesn't matter what you add for Department, as it will not affect the selection unless "By Department" is selected. However, to make it more logical to the user, you could create a command that to use for the dynamic LOV like this:

select table.`dept`
from table
union
select 'None'
from table

Add "None" to the list of values for Employee ID also. Then use prompt text like this:

if Type of Selection above = "By Department", select a department; otherwise, select "None".

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top