Using the Form Designer, you can create a dashboard to show graphs and list key figures for your company. This tutorial requires the AP Module.
This tutorial will show you how to display an analysis of expenses for a range of periods.
No. |
Name |
Display Label |
Type |
Domain |
Size |
Width |
Visible |
1 |
BankAccount |
Account |
String |
CB Bank Account Code |
8 |
8 |
Selected |
2 |
CurrencyCode |
Currency |
String |
Description |
60 |
10 |
Selected |
3 |
CBBalance |
Balance |
Float |
Amount |
|
10 |
Selected |
4 |
CBBalanceBs |
BalanceBs |
Float |
Amount |
|
10 |
|
Property |
Value |
Description |
Height |
200 |
Sets the grid height. You can also drag to change the height. |
Left |
25 |
Moves the grid to the left of the form. |
Top |
30 |
Sets the grid position from the top. You can also drag to change the position. |
Width |
200 |
Sets the grid width. You can also drag to change the width. |
Property |
Value |
Description |
Height |
200 |
Sets the navigator height. You can also drag to change the height. |
Left |
0 |
Moves the navigator to the left of the form. |
Top |
30 |
Sets the grid position from the top. You can also drag to change the position. |
Visible Buttons |
ebOpen ebPrint ebFilterSort ebCustomise |
Select the buttons to show on the grid navigator. Set the buttons listed to True, all others to False. |
Width |
25 |
Sets the grid width. You can also drag to change the width. |
You can now write the MaxBasic code to populate the Memory Table and graph.
Sub RefreshCash
Dim tblCBBank as Object
tblCBBank = OpenTable("CBBank")
tblCBBank.IndexName = "ActiveBank"
tblCash.Empty
tblCash.AllowInsertDelete = True
tblCBBank.First
Do Until tblCBBank.EOF
tblCash.Append
If tblCBBank.Inactive = False Then
tblCash.BankAccount = tblCBBank.BankAccountCode
tblCash.CurrencyCode = tblCBBank.CurrencyCode
tblCash.CBBalance = tblCBBank.CashBookBalance
tblCash.CBBalanceBs = tblCBBank.CashBookBalanceBs
tblCash.Save
End If
tblCBBank.Next
Loop
tblCash.AllowInsertDelete = False
tblCash.First
End Sub
Sub OnCreate
RefreshCash
End Sub
Sub OnNavCash(Sender as Object, Button as Number, ByRef Handled as Boolean)
Dim Report as Object
If Button = ebOpen Then
Dim Form1 as Object
Form1 = CreateObject("Accredo.CBBankAccountForm")
Form1.Find(tblCash.BankAccount)
End If
If Button = ebPrint Then
Report = CreateReport(tblCash, " Bank Account Balances ")
Report.Destination = "Screen"
Report.Run
Handled = True
End If
End Sub
(Ctrl+S).(Ctrl+R) to test the form.