Hi all.
Here is one I can't figure out.
The facts:
I have a table of projects with details about the projects. (Table name is PROJ) RELATED to that table, is another table that identifies the employee responsible for the project (EMPLTABLE.EMPID) The tables are related through the PROJID key in each table.
There can only be ONE employee for each project BUT, sometimes there is NO related record in that EMPLTABLE (no employee identified). That is where my problem starts.
So.... I created a report that lists all the projects, and I have a couple of parameters created, one for Start and End date query and one for a Status query. I had put the EMPLTABLE.EMPID field straight in the report at first but I didn't like the way it looked when there was no employee record so instead, I created a formula called "Planner Name" and it looks like this:
if not isnull({EMPLTABLE.EMPID}) then {EMPLTABLE.EMPID}
else "None Assigned"
I use that formula in my report instead of the field so I get that "None Assigned" text in the report rather than just seeing nothing.
All is OK up to here.
Now... my manager wants to be able to QUERY by the employee name. So I created a parameter called "Planner" and I added all the EMPLTABLE.EMPID records, and I also added a value called "NONE ASSIGNED".
Then I added into the record select formula this:
(if {?Planner} = "NONE ASSIGNED" then isnull ({EMPLTABLE.EMPID})
else {EMPLTABLE.EMPID}={?Planner})
This works to select any of the actual Employee names from the list, but if I select "NONE ASSIGNED", I get no records.
I also tried adding a value to the parameter called "ALL" and added that to the select formula, and I get ALL the projects that have employees assigned, but I don't get any of the projects that don't have an employee assigned.
Any help would be appreciated.
Thanks!
Here is one I can't figure out.
The facts:
I have a table of projects with details about the projects. (Table name is PROJ) RELATED to that table, is another table that identifies the employee responsible for the project (EMPLTABLE.EMPID) The tables are related through the PROJID key in each table.
There can only be ONE employee for each project BUT, sometimes there is NO related record in that EMPLTABLE (no employee identified). That is where my problem starts.
So.... I created a report that lists all the projects, and I have a couple of parameters created, one for Start and End date query and one for a Status query. I had put the EMPLTABLE.EMPID field straight in the report at first but I didn't like the way it looked when there was no employee record so instead, I created a formula called "Planner Name" and it looks like this:
if not isnull({EMPLTABLE.EMPID}) then {EMPLTABLE.EMPID}
else "None Assigned"
I use that formula in my report instead of the field so I get that "None Assigned" text in the report rather than just seeing nothing.
All is OK up to here.
Now... my manager wants to be able to QUERY by the employee name. So I created a parameter called "Planner" and I added all the EMPLTABLE.EMPID records, and I also added a value called "NONE ASSIGNED".
Then I added into the record select formula this:
(if {?Planner} = "NONE ASSIGNED" then isnull ({EMPLTABLE.EMPID})
else {EMPLTABLE.EMPID}={?Planner})
This works to select any of the actual Employee names from the list, but if I select "NONE ASSIGNED", I get no records.
I also tried adding a value to the parameter called "ALL" and added that to the select formula, and I get ALL the projects that have employees assigned, but I don't get any of the projects that don't have an employee assigned.
Any help would be appreciated.
Thanks!