Search This Blog

Trial Balance Report

Here is the sample report designer or FRX. You can use groups in the report designer. As you can see, I used Data Groupings. You will group by the field "Name" for example. In the group footer, you can use a variable which sums the field "amount". Right click your report and look at the tabs Data Grouping and Variables.

Special Thanks to Samir of Foxite.

Activity Log Code

This is the first time I will be using Activity Log on my program. Where the User or Admin can view the activity of a certain user such as adding or editing. You can also add certain specific information such as amount and account chart of journal entries.

SELECT SviewActivityLog
APPEND BLANK
REPLACE UserName WITH pCurrUser
REPLACE ActivityDate WITH DATE()
REPLACE ActivityLog WITH "Add Journal Entries in "+ALLTRIM(pBranchName)+".."

SELECT SviewActivityLog
APPEND BLANK
REPLACE UserName WITH pCurrUser
REPLACE ActivityDate WITH DATE()
REPLACE ActivityLog WITH "Edit Journal Entries in "+ALLTRIM(pBranchName)+".."

Login Code

Login Code

SELECT SviewAccess
=REQUERY("SviewAccess")
PUBLIC pCurrUser, pBranchName
LOCATE FOR ALLTRIM(LOWER(Username)) = ALLTRIM(LOWER(THISFORM.Text1.Value))
IF FOUND()
IF ALLTRIM(AccessStatus) = "LOGOUT"
IF THISFORM.Text3.Value = 3
WAIT WINDOW "Three (3) incorrect attempts." NOWAIT
REPLACE SviewAccess.AccessStatus WITH "BLOCK"
THISFORM.Release()
QUIT
ELSE
IF EMPTY(ALLTRIM(THISFORM.Text2.Value))
WAIT WINDOW "Cannot continue without password." NOWAIT
ELSE
IF EMPTY(ALLTRIM(THISFORM.Combo1.Value))
WAIT WINDOW "Cannot continue without Branch Office." NOWAIT
ELSE
IF LOWER(ALLTRIM(Password)) == LOWER(ALLTRIM(THISFORM.Text2.Value))
WAIT WINDOW "Welcome " + Username NOWAIT
pDept = ALLTRIM(sviewaccess.AccessDepartment)
pCurrUser = ALLTRIM(Username)
pFullName = ALLTRIM(FullName)
pPassword = ALLTRIM(sViewAccess.Password)
pBranchName = ALLTRIM(THISFORM.Combo1.Value)
IF (ALLTRIM(THISFORM.Text1.Value)) = "MUFFIE"
ELSE
REPLACE SviewAccess.AccessStatus WITH "LOGIN"
ENDIF
THISFORM.ActivityLogin()
SELECT SviewAccess
=TABLEUPDATE(.T.)
THISFORM.Release()
=REQUERY("SviewAccess")
ELSE
WAIT WINDOW "Incorrect Password." NOWAIT
THISFORM.Text3.Value = THISFORM.Text3.Value + 1
THISFORM.Text2.SetFocus()
ENDIF
ENDIF
ENDIF
ENDIF
ELSE
=MESSAGEBOX("User currently Logged In : "+ ALLTRIM(SviewAccess.FullName)+" station.", "MultiUser: Block")
ENDIF
ENDIF

Public

Recently I learned how to use PUBLIC in getting info or data from another form to another form. And it was very usable for me since my program has a login and branch name requirements.

On Login Form
PUBLIC pBranchName
pBranchName = ALLTRIM(THISFORM.Combo1.Value)

On Branch Setting Form
PUBLIC pBranchName
THISFORM.Label18.Caption = pBranchName

On Journal Entry Form
PUBLIC pBranchName
LOCATE FOR ALLTRIM(BranchName) = ALLTRIM(THISFORM.Combo1.Value)
pBranchName = ALLTRIM(BranchName)
= MESSAGEBOX("You select "+ALLTRIM(pBranchName)+" Office?", "Confirmation")
THISFORM.Release()