I need a form that works pretty much like the “Work Center Calendar” in Attain (version 3.01b) - i.e F99000769. I want to be able to type in a starting date (which has to be a monday, but that part is under control), and then only monday-friday in the following 2 weeks will be shown! The “main-table” for the matrix form will be “Resource” and it doesn’t really matter what table to use use as the Matrix-table (but I do not want to create a new one!), the information to be shown in the matrix-part will be calculated on the fly!
Yeah - Matrix forms can be klind’a tricky. I would set MatrixSourceTable to ‘Date’ - This is a virtual table in Navision, that contains Dates [:D] Then, you sould be able to set a filter on the form
CurrForm.Matrix.MatrixRec.SETRANGE("Date Type",CurrForm.Matrix.MatrixRec."Date Type"::Date); CurrForm.Matrix.MatrixRec.SETFILTER("Period Start",'%1..%2|%3..%4',<Monday>,<Friday>,<Monday>,<Friday>); are the two monday dates, of course…
Thanks Helge But where do I put the filter?
Just to make things clear: What I want, is a function/button like the ones on the form “Work Calendar” which allows you to change between 1 day, 7 days, 30 days etc. The new button should have the function of showing the next 2 weeks (but only monday-friday) with optional startingdate! I guess I have to put some new code on the triggers ‘OnFindRecord()’ and ‘OnNextRecord()’ on the matrixform?? Helge: I think what you have in mind, was a flowfilter??
Hi Helge Just to say sorry! You’r tip worked fine! By placing the filter you mentioned on the trigger ‘OnOpenForm()’ on the “Mainform”, it seems like I’ve got what I wanted! Thanks for the tip!! (If it doesn’t work quite the way I needed, I’ll be back again!).
Well, here I am again, with another problem! I have tried to upload a screendump, but I didn’t succeed! I have created a Matrix-form, as mentioned earlier. The width of the matrixpart is just enough to show 14 days at a time. The problem is, that when I choose a starting date ealier than today I have to scroll to the left to see all the 14 days? Is there any way to “get rid of the blancs (column)”? This isn’t any big problem but it would look a lot more streamlined if all the 14 days where shown on the form, no matter which starting day choosen!
Yop can try, to add
IF Date.find('-') THEN; after the filter for the dates have been set. You might also want to do a
CURRFORM.UPDATE(FALSE); on the StartDate - OnAfterValidate.
I’ve allready added the FIND(’-’) and it works! Thanks!