Matrix problem

bRahms
Member Posts: 44
hi,
we're making a customized matrix box with as SourceTable Date. The horizontal rules displays the staff members and the matrix is filled with their tasks they have planned that day.
So far, so good, but what we want seems to be harder as we thought. When a staff members plans a task (eg TASK01 from 28/07/07 till 30/07/07), the matrix box only fills in the startdate. What we want, is that the period is filled with the taskname.
Is this possible?
This is what we have to fill in the startdate:
we're making a customized matrix box with as SourceTable Date. The horizontal rules displays the staff members and the matrix is filled with their tasks they have planned that day.
So far, so good, but what we want seems to be harder as we thought. When a staff members plans a task (eg TASK01 from 28/07/07 till 30/07/07), the matrix box only fills in the startdate. What we want, is that the period is filled with the taskname.
Is this possible?
This is what we have to fill in the startdate:
codAgenda := ''; idx := 0; recAgenda.RESET; recAgenda.SETCURRENTKEY(EmployeeID,TaskID,StartDateSub); recAgenda.SETRANGE(StartDateSub,CurrForm.PlanMatrix.MatrixRec."Period Start"); recAgenda.SETRANGE(EmployeeID,ID); IF recAgenda.FINDFIRST THEN BEGIN recTask.SETRANGE(ID, recAgenda.TaskID); IF recTask.FINDFIRST THEN BEGIN FOR idx := recAgenda.EndDateSub - recAgenda.StartDateSub DOWNTO 0 DO BEGIN codAgenda := recAgenda.TaskID; END; END END;
0
Answers
-
I didn't exactly understand what you said but I think you want to show the tasks in the right side of the matrix and the left side shows the staff members. And you are seeing starting date instead of the tasks??
If I understood right you have to change to sourceExpr in the left side (starting date?) and place a variable (for the tasks name) which you can get by the rec's starting date,ending date filters on the OnAfterGetRecord of the matrix.Ufuk Asci
Pargesoft0 -
No.
What I've got
Staff Member 01
Task 01 -> Stardate 28/07/07
-> EndDate 31/07/07
Matrix:27/07 28/07 29/07 30/07 31/07 Staff 01 T01
What i want:27/07 28/07 29/07 30/07 31/07 Staff 01 T01 T01 T01
0 -
Maybe with a SETFILTER i can 'undo' my range so it can be filled that way?0
-
I didn't understand why you filter recTask instead of looping in recAgenda.
Have you tried to filter starting date and ending date by setfilter and assign the value to codAgenda in that loop. Something like:
codAgenda := '';
idx := 0;
recAgenda.RESET;
recAgenda.SETCURRENTKEY(EmployeeID,TaskID,StartDateSub);
recAgenda.SETFILTER(StartDateSub,'>=%1',CurrForm.PlanMatrix.MatrixRec."Period Start");
recAgenda.SETFILTER(StartDateSub,'<=%1',CurrForm.PlanMatrix.MatrixRec."Period End");
recAgenda.SETRANGE(EmployeeID,ID);
IF recAgenda.FINDFIRST THEN BEGIN
REPEAT
codAgenda := recAgenda.TaskID;
UNTIL recAgenda.NEXT = 0;
END;Ufuk Asci
Pargesoft0 -
Each cell can only be filled on the moment Navision is displaying it.
So in the cell of the matrix, you need to put some code to get a value to show.
See http://www.mibuso.com/howtoinfo.asp?FileID=13 on how to do it.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thank you for your help ufuk (and kriki), but now it starts to fill in the TaskID from the beginning until the end of time instead of the end of the task.
I'm trying to find an answer on this, if you know an answer, let me know!0 -
bRahms wrote:Thank you for your help ufuk (and kriki), but now it starts to fill in the TaskID from the beginning until the end of time instead of the end of the task.
I'm trying to find an answer on this, if you know an answer, let me know!Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
The code ufuk gave mePlanMatrix - OnAfterGetRecord()
codAgenda := '';
recAgenda.RESET;
recAgenda.SETCURRENTKEY(EmployeeID,TaskID,StartDateSub);
recAgenda.SETFILTER(StartDateSub,'<=%1',CurrForm.PlanMatrix.MatrixRec."Period Start");
//recAgenda.SETFILTER(StartDateSub,'>=%1',CurrForm.PlanMatrix.MatrixRec."Period End"); // doesn't seem to do a thing
recAgenda.SETRANGE(EmployeeID,ID);
IF recAgenda.FINDFIRST THEN BEGIN
REPEAT
codAgenda := recAgenda.TaskID;
UNTIL recAgenda.NEXT = 0;
END;
Or isn't it that you mean?0 -
Solved with adding an extra IF into the repeat
IF recAgenda.EndDateSub +1 >= CurrForm.PlanMatrix.MatrixRec."Period End" THEN0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions