I have been trying to use matrix box but I am lost somewhere.
I want to display dates in the heading of the table in the right side of the matrix table (As in Analysis by dimension). But I am unable to create the column headings.
For example, I use a filter "010107..310607". The right side table's column heading should be 010107 to 310607. The problem is I am unable to create those heading like 01/01/07, 02/01/07.....31/06/07.
I don't know how to loop so that the next column in the table is next date. Please enlighten me.
0
Comments
http://www.mibuso.com/howtoinfo.asp?FileID=13
http://www.BiloBeauty.com
http://www.autismspeaks.org
- Create a form with table Item bound to it (to setup this manually look for the property of the form SourceTable and Type Item or 27 in the field)
- Place a matrixbox in the form.
- Change the property name of the matrixbox to Matrix (this is for that we can able to access its property and access the record bound to it).
- change also its property MatrixSourceTable into "Date". (this will be the table that is bound for the matrixbox)
- Add a field of the item to the left side of the matix. Lets say Add the Description. (Right click on the form and select field menu, highlight the field description and place the cursor inside the matrix then hit the left click to add the field).
- declare a global variable SampleVariable.
- On the right side of the matrix place a textbox on the grid and also a textbox for its column heading.
- Change the SourceExpr property of the TextBox that is on the grid with the variable SampleVariable.
- And also change the SourceExpr property of the textBox that is on the columnheading with this CurrForm.Matrix.MatrixRec."Period Start" (You can see this via C/AL Symbols Menu OR F5, Select Currform > Controls > matrix > click the button "->" at the buttom right so that you can see its properties select variable > MatrixRec > FielName > Period Start > Hit the ENTER).
- On the trigger of the form OnOpenForm place this code - Save the Form.
- Run the form.
Enjoy. Hope this works for you.
I did as you said but still, I get only one date as header in the right hand side table of the matrix box. I am still missing somewhere. Thank you so much for matrixsourcetable property.
But still I get only the first date of the filter as header in the right hand side table of the matrix. Please help
Matrix-OnAfterGetRecord
CurrForm.Matrix.MatrixRec.SETRANGE("Period Start",StartDate,EndDate);
MatrixHeader := CurrForm.Matrix.MatrixRec."Period Start";
Pargesoft
Hope to get further suggestions from you people.