I want to create at matrixform similar to to 113 “Budget”. My problem is, that I want to divide a day into 3 parts (Morning, afternoon, evening) – is there any easy way to do that? I know that I can create a new table, and fill this table with data – but I want to be able to fill at runtime, just like on form 113….
In the same form, I will show some information from table 27 Item: I have created a new option field to the table, and filtering on this field, gives me the items I want to show. For every item, I will make up to 4 new lines beneath the item (its up to the user to decide how many)…That is, for every item-rec there has to be inserted up to 4 new “dummy-rec” underneath. For this part, I will use a new constructed buffer-table with primary-key = ‘Item number’,’Option-value’.
Has anyone done anything like this before?
Help - help - help:-(
Yes, I have done this plenty of times. I can probably find a sample to upload for you somewhere and upload. In fact I used to teach this as part of an Advanced Forms class I used to teach, and proposed it for a topic at TechEd developers, but since Matrix forms are on the way out, they were not too interested.
Basically what you do is base the matrix on Integer, and create a function that gets the mod of the number to find out what to display. Something like
Function(Column No) : Text(30);
ColumnPos := ColumnNo / DIV 3;
Case ColumnNo / MOD 3 of
0:
Begin
Exit(DisplayMorningValue(ColumnPos));
End;
1:
Begin
Exit(DisplayAfternoonValue(ColumnPos));
End;
2:
Begin
Exit(DisplayEveningValue(ColumnPos));
End;
End;
This is for the columns,a nd you can do the same thing for the ROWs, though for rows it may be easier to populate a temporary table
This should get you started, if you need more help just ask. I will see if I can find a sample form. I have one in a 1.3 database somewhere that may get you started.