Creating a matrix form
A matrix shows information from multiple tables at the same time. This recipe will show you how to create a matrix that shows the amount a customer has spent on specific items.
How to do it...
Add a global function
CalculateData
that returns a text variable.Add a global function
ColumnHeader
that returns a text variable.Add a matrix box to the form.
Set the following properties on the matrix box control:
Property
Value
Name
MatrixBox
Editable
No
MatrixSourceTable
Item
Set the following property on the form:
Property
Value
SourceExpr
Customer
Add the No. and Name fields to the left-hand side of the matrix box using the Field menu.
Add a textbox to the right-hand side of the matrix box.
Set the following property on the textbox:
Property
Value
SourceExpr
CalculateData
Add a textbox as a column header above that textbox.
Set the following property on the textbox:
Property
Value
SourceExpr
ColumnHeader
Add the following code to the
ColumnHeader...