Enviroment: CR 10/11; DB=ADO.net, XSD file;
Have 2 tables:
a list of projects;
a list of tasks;
link between tables is project ID.
Fields in project :
Workspace ID : Unique id, links to task
Name : Name of project
Fields in task :
Workspace ID : Link to Project Table
Name : Name of task
Number of task : unique for task
Status : 0=not started, 1=in progress, 2=complete, 4=unknown
Actual Finish Date : date task was completed, or null if not complete
Milestone : Boolean, is the task a milestone task
Group by Project ID
Need to create a report, that
- only includes milestone tasks (got this, using record selection)
- shows the max "Actual Finish Date" for each project; this will only be for tasks with a status of 2
- shows "No Milestones Complete" if "Actual Finish Date" is null for all tasks in project; These will have a status other then 2.
Sample Data:
Project 1
Name Number ActualFinish Status Milestone
Task 1 5 1/10/05 2 True
Task 2 10 1/0/00 2 True
Task 3 15 1/0/00 2 True
Task 4 20 1/0/00 2 True
Task 5 25 3/20/05 2 True
Task 6 30 1/0/00 0 True
Task 7 31 1/0/00 0 True
Project 2
Name Number ActualFinish Status Milestone
Task 1 7 11/17/04 4 True
Task 2 8 11/17/04 2 True
Task 3 9 1/21/05 4 True
Task 4 10 1/13/05 2 True
Task 5 16 1/27/05 2 True
Task 6 21 1/0/00 4 True
Task 7 25 1/0/00 0 True
Task 8 30 1/0/00 0 True
Task 9 31 1/0/00 0 True
Project 3
Name Number ActualFinish Status Milestone
Task 1 7 1/0/00 4 True
Task 2 14 1/0/00 4 True
Task 3 19 1/0/00 4 True
Task 4 24 1/0/00 4 True
Task 5 29 1/0/00 4 True
Task 6 30 1/0/00 4 True
Desired Report output:
Project 1
Name Number ActualFinish Status Milestone
Task 1 25 3/20/05 2 True
Project 2
Name Number ActualFinish Status Milestone
No Milestones completed
Project 3
Name Number ActualFinish Status Milestone
Task 4 16 1/27/05 2 True
I am almost there (I think) after reading a number of threads here.
I am using a group selection formula,
But I am getting more records than I expect:
for projects with a task that has a max"Actual finished date", I get BOTH the max date finished task, and the max task number
for projects with no Max"Actual finished date", I get all the tasks.
Output Sample:
Project 1
Name Number ActualFinish Status Milestone
Task 1 25 3/20/05 2 True
Task 7 31 1/0/00 0 True
Project 2
Name Number ActualFinish Status Milestone
Task 1 7 1/0/00 4 True
Task 2 14 1/0/00 4 True
Task 3 19 1/0/00 4 True
Task 4 24 1/0/00 4 True
Task 5 29 1/0/00 4 True
Task 6 30 1/0/00 4 True
Project 3
Name Number ActualFinish Status Milestone
Task 2 16 1/27/05 2 True
Task 6 31 1/0/00 0 True
I've tried a number of things:
which does not show any projects where Task.ActualFinish is null
Also:
which still includes the max date task, and the max task number task
A couple of dozen more, none of which worked.
Am I way off track?
Any suggestions on how to solve are greatly appreciated!!
Thanks
Jim
Have 2 tables:
a list of projects;
a list of tasks;
link between tables is project ID.
Fields in project :
Workspace ID : Unique id, links to task
Name : Name of project
Fields in task :
Workspace ID : Link to Project Table
Name : Name of task
Number of task : unique for task
Status : 0=not started, 1=in progress, 2=complete, 4=unknown
Actual Finish Date : date task was completed, or null if not complete
Milestone : Boolean, is the task a milestone task
Group by Project ID
Need to create a report, that
- only includes milestone tasks (got this, using record selection)
- shows the max "Actual Finish Date" for each project; this will only be for tasks with a status of 2
- shows "No Milestones Complete" if "Actual Finish Date" is null for all tasks in project; These will have a status other then 2.
Sample Data:
Project 1
Name Number ActualFinish Status Milestone
Task 1 5 1/10/05 2 True
Task 2 10 1/0/00 2 True
Task 3 15 1/0/00 2 True
Task 4 20 1/0/00 2 True
Task 5 25 3/20/05 2 True
Task 6 30 1/0/00 0 True
Task 7 31 1/0/00 0 True
Project 2
Name Number ActualFinish Status Milestone
Task 1 7 11/17/04 4 True
Task 2 8 11/17/04 2 True
Task 3 9 1/21/05 4 True
Task 4 10 1/13/05 2 True
Task 5 16 1/27/05 2 True
Task 6 21 1/0/00 4 True
Task 7 25 1/0/00 0 True
Task 8 30 1/0/00 0 True
Task 9 31 1/0/00 0 True
Project 3
Name Number ActualFinish Status Milestone
Task 1 7 1/0/00 4 True
Task 2 14 1/0/00 4 True
Task 3 19 1/0/00 4 True
Task 4 24 1/0/00 4 True
Task 5 29 1/0/00 4 True
Task 6 30 1/0/00 4 True
Desired Report output:
Project 1
Name Number ActualFinish Status Milestone
Task 1 25 3/20/05 2 True
Project 2
Name Number ActualFinish Status Milestone
No Milestones completed
Project 3
Name Number ActualFinish Status Milestone
Task 4 16 1/27/05 2 True
I am almost there (I think) after reading a number of threads here.
I am using a group selection formula,
Code:
({Task.ActualFinish} = Maximum ({Task.ActualFinish}, {Workspace.WorkspaceID}))
or ({Task.Number} = Maximum ({Task.Number}, {Workspace.WorkspaceID}));
But I am getting more records than I expect:
for projects with a task that has a max"Actual finished date", I get BOTH the max date finished task, and the max task number
for projects with no Max"Actual finished date", I get all the tasks.
Output Sample:
Project 1
Name Number ActualFinish Status Milestone
Task 1 25 3/20/05 2 True
Task 7 31 1/0/00 0 True
Project 2
Name Number ActualFinish Status Milestone
Task 1 7 1/0/00 4 True
Task 2 14 1/0/00 4 True
Task 3 19 1/0/00 4 True
Task 4 24 1/0/00 4 True
Task 5 29 1/0/00 4 True
Task 6 30 1/0/00 4 True
Project 3
Name Number ActualFinish Status Milestone
Task 2 16 1/27/05 2 True
Task 6 31 1/0/00 0 True
I've tried a number of things:
Code:
({Task.ActualFinish} = Maximum ({Task.ActualFinish}, {Workspace.WorkspaceID})
Also:
Code:
if ({Task.Status} = 2) then
IncludeTask := ({Task.ActualFinish} = Maximum ({Task.ActualFinish}, {Workspace.WorkspaceID}))
else
IncludeTask := ({Task.Number} = Maximum ({Task.Number}, {Workspace.WorkspaceID}));
IncludeTask;
A couple of dozen more, none of which worked.
Am I way off track?
Any suggestions on how to solve are greatly appreciated!!
Thanks
Jim