Tuesday, March 27, 2007

Matrix box

I’m working with NAV for 3 years already and still there are unexplored areas for me. I am using the matrix box for a first time now. It seems as an extremely useful control. However there is not enough information in the help or in the developer’s guide how to work with it. The help that is given is totally confusing and the reason for this is that the matrix can combine two tables and provide a result, but in the help both tables are the same. This can not demonstrate the full functionality of the matrix at first place and confuses with how things happen because both tables are the same on second place. Here is my help on matrix:

1.Matrix has three parts - right part(table part), header part and result part

2.Right part uses as source table the source table of the form. You can think of the right part as an ordinary data grid - item list for example.

3.Header part uses as source table the source table of the matrix box. If the source table of the matrix is Location, you should use CurrForm.Matrix.MatrixRec.Code in order to display Location codes as header values. Keep in mind that you should change the name of the matrix control(here it is Matrix) in order to use it.

4.The result part is the grid between the right part and the header part. It is a result of some calculations that generates values in the fields of the grid. For example you can show the inventory of each item in each location simultaneouly in the upper example. You should use the Matrix.OnAfterGetRecord trigger for this calculation. Keep in mind that this calculation is done for every cell in the grid and sometimes the form can be reaaly sloooow.

That’s what I found useful. Perhaps there is other functionality that I do not know still.

Posted by gregory in 07:50:14
Comments

Leave a Reply