Contents 

Fast Start
Weight Scale Interfacing (Digi D770)
What Is Visual Builder?
What's New In Visual Builder?
Creating A CAPITAL Form
Creating a Form - Conceptual Overview
Creating a Form - Quick Guide For Advanced Users
The Forms Wizard
Creating A CAPITAL Report
The Label Wizard
Report Wizard Tutorial
New & Revised Topics in CAPITAL 7.5
AllocatePayment()
CrossTab()
CreateTable()
EventAdd()
FilterTable()
Find()
PayMethodName()
ReadINI()
SendHTMLMail()
TranInfo()
WriteNote()
New & Revised Topics in CAPITAL 7.41
AddPayment()
Business Functions Listing
BufferCommit()
BufferRollBack()
BufferUpdates()
ExportASCII()
GetFolder()
KitList()
LockRecord()
ReadNote()
ReadTextFile()
StockQuantity()
StrWrap()
WriteTextFile()
New & Revised Topics in CAPITAL 7.4
Business Functions Listing
CompanyName()
Department()
Field Objects
JobInfo()
Linking
Moving & Resizing Body Objects
Operators & Expressions
OrderTable()
PathData()
Picture Object Properties
ReadINI()
ReadNote()
RunApplication()
Sample Scripts
Send Product Info Email With Pictures
Start-up Switches
StockAnalysis()
TagInfo()
TranWrite()
WriteINI()
New & Revised Topics in CAPITAL 7.3
AddStock()
AddTraceProperty()
BackAllocate()
Business Functions Listing
CardFileBill()
ComError()
ComClose()
ComOpen()
ComRead()
ComSetup()
ComWrite()
ComputerName()
EchoBox()
EchoBoxOn()
EchoBoxOff()
LockSemaphore()
PasswordInfo()
ScriptRun()
TodoAdd()
Trouble-Shooting Guide
UnlockSemaphore()
New & Revised Topics in CAPITAL 7.2
Business Functions Listing
ImportASCII()
Journal()
ReadNote()
StockGetQuantity()
StockQuantity()
TimeFormat()
Version()
Basic Editing
Moving & Resizing Objects
Moving & Resizing Body Objects
Creating Forms & Reports
Form Bodies
Form Design Hints & Tips
Body Properties
Body Contents
Rule Wizard
Rule Wizard Guidelines
Body Rules
Group Wizard
Body Groups & Totals
Form Output Properties
Form Notes
Question Wizard
Form Question Prompt
Form Questions
Preface and Postscript Scripts
Form Dictionaries
Page Setup
Form Editor Preferences
Field Objects
Field Formulas
Bar Code Field Objects
Text Object Properties
Picture Object Properties
Linking
Why are Table Joins Necessary?
Linking Forms - Concepts
Linking Forms - Tutorial
Linking Forms - Hints & Problem Solver
Special Topics
CAPITAL Data Browser
Bar Codes - An Overview
Cross-Tab Concepts
Cross-Tabs
Cross Tab Fields
Cross-Tab Hints & Tips
Exporting Data
Printing
Transaction (Form) Printing
The Print Job Manager
Windows Printing Concepts
Script Programming
Business Functions Listing
Capital Business Script
Variables & Data Types
Scope
Operators & Expressions
Type Conversion
Business Functions Overview
Commands
CALL
DEBUG
GOTO (label)
IF (expression) GOTO
IF (expression) ... ELSE ... ENDIF
PAUSE
REM (*)
RETURN
Visual Forms Builder Special Variables
Sample Scripts
Sending Email Using CBS
Programmer's Frequently Asked Questions
Business Functions
AAdd()
Abs()
AddCustomer()
AddJobCard()
AddMail()
AddPayment()
AddRecord()
AddStock()
AddTraceProperty()
AllocatePayment()
Alltrim()
AnswerYes()
ArraySort()
Asc()
AsChar()
ASIZE()
AsTran()
AsVal()
AT()
BackAllocate()
BPayCRN()
BPayError()
BufferCommit()
BufferRollBack()
BufferUpdates()
CDOW()
Ceil()
CHR()
CloseFile()
CloseIndex()
CloseTable()
CMONTH()
CompanyName()
CompressTable()
ComError()
ComClose()
ComOpen()
ComRead()
ComSetup()
ComWrite()
ComputerName()
CopyFile()
CopyRecord()
CopyToClipBoard()
CreateFile()
CreateEmailJob()
CreatePrintJob()
CreateTable()
CrossTab()
CTOD()
DateFormat()
DateFromMonth()
DAY()
Dictionary()
DOW()
DTOC()
DTOS()
Echo()
EchoBox()
EchoBoxOff()
EchoBoxOn()
EchoStatus()
Eof()
EraseFile()
EventAdd()
ExpenseAnalysis()
ExportASCII()
FilterTable()
Find()
FindWindow()
ForDate()
FormAdd()
FormResult()
FreeCPU()
FormCreate()
FormShow()
GetField()
GetFolder()
Goto()
GotoBottom()
GotoTop()
HoldRecord()
GroupChange()
Idle()
IF()
ImportASCII()
IndexTable()
Input()
InputFile()
INT()
IsEmpty()
IsFile()
IsFileEnd()
IsLayBy()
IsPaid()
IsPayment()
JobInfo()
JobPriority()
JobStatus()
KitList()
LEFT()
LEN()
LockRecord()
LOWER()
LTRIM()
Max()
Min()
ModemDial()
Month()
MonthEnd()
MonthStart()
NTrim()
NumToWord()
OpenFile()
OpenTable()
OrderTable()
OpenVisualBuilder()
Pad()
PathCompany()
PathProgram()
PayMethodName()
PostMessage()
PriceUpdate
RAT()
ReadFile()
ReadNote()
ReadFileLine()
ReadTextFile()
RecNo()
RenameFile()
Replicate()
Right()
Round()
Rtrim()
RunApplication()
Seconds()
Security()
SendDirect()
SendMail()
SendEscapeCodes()
SendMail()
Shell()
Skip()
Space()
SpecialName()
SpecialPrice()
SQRT()
StockAnalysis()
StockDescription()
StockMovement()
StockPrice()
StockId()
StockQuantity()
Str()
StrLine()
StrLineCount()
Strtran()
StrWrap()
Substr()
StrZero()
Time()
Today()
TodoAdd()
TranAdd()
TranCreate()
TranWrite()
TranInc()
Transform()
TranStr()
Type()
UnlockRecord()
Unpaid()
Upper()
UserName()
UserNumber()
Version()
WaitCursor()
WaitFile()
Week()
Write()
WriteFile()
WriteFileLine()
WriteNote()
WriteTextFile()
Year()
ZipFile()
Tutorials
Report Wizard Tutorial (Basic)
Label Wizard Tutorial (Advanced)
Forms Library
The Visual Builder Report & Forms Library
Forms Stationary
Report Library - Customer Transactions
Report Library - Cash Management
Report Library - Sales Analysis
Report Library - Sales Orders & Back Orders
Report Library - Stock Control
Report Library - Service Management & Periodic Billing
Report Library - Special
Appendix
Moving Forms
Logging On
Overriding Print Warning Messages
Questions & Answers
Start-up Switches
Trouble-Shooting Guide
Weight Scale Interfacing (Digi D770)
Working With Text Printers

CAPITAL Series 7 Visual Builder Reference Guide

Prev Page Next Page

Creating a Form - Parents & Bodies


If you are familiar with creating forms using previous versions of CAPITAL or have used report writers in the past, then you are likely to be familiar with the concept of "bands". These are the sections of a page that a report or form can be broken up into. A typical form or report has this arrangement:

generate/vb13.gif

Notice that in CAPITAL the header (top section) and footer (bottom section) of the report are combined together and form what is called the Parent. The parent body is sometimes referred to as the "container form".

If the form you are editing is an invoice then it would typically have a name/address details section at the top (the header), the items sold (the body) and any comment lines and totals at the bottom (the footer).

This middle section containing the list of sale items is also the first body. In Visual Builder it is referred to as Body 1. CAPITAL can support as many body sections as are required, although it would be rare to have more than one body on a document such as an invoice.

This may not be the case for a different type of form. For example, the job card of the Service Manager might have header and footer sections plus a "materials/parts used" section and a "labour/time" section. This would require three sections. The Parent (the header/footer), Body 1 (the materials/parts used list) and Body 2 (the time sheet info).

Creating the Form

Use the Form Wizard to create the basic lay-out of the form for you. Initially, the Form Wizard does two important tasks:

  • It gathers together all the databases that are required to represent the information you wish to show.

  • It connects a "dictionary" to the form. A dictionary is a list of predefined field codes that you can drop onto the form to represent the information you want.

Arranging Fields in their Correct Sections

generate/redtrafficlight.jpg Most of the objects you'll wish to place on the form are quite straightforward to manipulate. The mistake you are most likely to make is to place a field on the form and assign it to the wrong section or body.

The field code PCODE is normally used by CAPITAL as short-cut to represent the "product code". A product code doesn't belong in the header section where address details are found or at the bottom of the form where totals are placed. It is obviously related to the stock items that are sold and should therefore be assigned to Body 1. Anything that appears repeatedly on a form probably belongs in Body 1.

The Parent Body

Let's, for the sake of an example, consider tax rates. What about something like TAXCODE? Where should it be placed? In the Parent (top or bottom section) or in Body 1?

This would depend on what TAXCODE represents. If it represents the tax number, then it belongs to the Parent. This is because there is only one tax number per invoice transaction. It only needs to be printed once at a fixed location on the form. (An exception would be if the form contains a tear-away or fold over section, in which case it might need to appear more than once. However, there is still only one tax number involved, it just happens to be printed twice.)

Other fields that would normally only appear once include the account code, account name, account address, delivery address, invoice total, sales tax sub-total, and so on. These field codes, therefore, belong to the entire transaction, and should be placed in the parent.

But what if TAXCODE referred to the tax rate of each individual sale item found on the invoice? (Sale items will appear many times on an invoice, with each different from the other.) It would then be placed in Body 1 where it would go alongside the product code, product description, product quantity, etc. As there can be many products per invoice, it would be ambiguous to place it anywhere else--the user reading the form would be unable to tell which item TAXCODE referred to.