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

Label Wizard Tutorial (Advanced)


This tutorial is for advanced users, consultants and computer programmers who want a quick overview of some of the main features of Visual Builder.

In this tutorial a label will be created with the following characteristics:

  • It will display the product description and a bar code based on the entry inside the stock Alternative field.

  • The label will prompt for the invoice number to print.

  • One label will be printed for each stock item sold, except for non-stock items or stock items with quantities sold that are equal to or less than zero.

1. Start Visual Builder and Click on Wizard. Then click on the Label Wizard.

2. Click on Next and select "Invoiced Stock Items (Product Sales)"

3. Click on Next and specify the dimensions of the label.

4. Click on Next and select contents->title and press Add and then New Line.

5. Select stock->Name2 and press Add.

6. Click on Finished.

7. Double-click on the Name2 object and change the Display Length field setting to 13.

generate/labelt1.gif

8. Click on the Barcode tab and select Ean/Jan 13, then click on OK.

9. Click the Glasses generate/setting1.gif on the tool bar and click on the Question tab.

10. Click on the Wizard button.

11. Enter you question text and click on Finished. For example, "Enter the the invoice number to print labels for."

12. Click on the Output tab and enter a suitable name for the form and click on OK.

13. Click on the Title object on the label.

14. Click right-mouse and select Body Properties.

15. Click on Links.

16. Change Sort from:

DTOS(Date) + Invoiceno

to:

Invoiceno

The above ensures that the label is sorted and searched by the invoice number instead of the date.

17. In Seek enter:

Answer1

The variable Answer1 was created by the Question Wizard. It contains the invoice number entered by the user when the label is executed.

18. Untick Nearest Match.

We want to ensure that labels for only the exact transaction are printed. Unticking this option ensures that the next closed invoice is not printed instead.

19. Make sure Join is set to "Not Joined" if there is only one label per page. Otherwise leave it set to Joined.

20. Click on the Rules tab.

21. Click on first visible rule in the first list box.

22. Click add and type the following:

.Not. Empty(contents->code)

The above rule ensures that the record is skipped if the invoice item's code is blank. We don't want to print labels for non-stock items.

23. Click OK.

generate/flashlight.jpgNote: You could add a similar rule for items that don't have a bar code, e.g.

.Not. Empty(stock->Name2)

The above rule assumes that the bar code will be stored in stock->Name2 which is the stock record's alternative product code field. If the code is blank (empty), the record will be not pass the rule and it will be skipped over.

24. Click on the box underneath "When one of these rules is true, reporting is finished".

25. Click on Add.

26. Enter:

Answer1 # Contents->Invoiceno

This rule ensures that if the transaction number has changed, label printing will end.

27. Click on OK.

28. Now edit the first rule and change it like so:

AsVal(Contents->Qty) > 0

This results in labels printing if the quantity invoiced is greater than zero.

All stock quantity fields in CAPITAL are stored as character fields. They must be converted to numeric using the AsVAL() function before numeric comparisons can be made.

29. Click Add again. (You should be in the "All these rules must be true section".)

30. Add the following script:

Declare LabelCount Type Numeric

Declare LoopCheck Type Character

* Keep printing same record?

If LabelCount > 0

   LabelCount := LabelCount -1

   HoldRecord := TRUE

   Return TRUE

Endif

* Still on same line?

If LoopCheck == Contents->Invoiceno + Contents->Lineref

   Return TRUE

Endif

* Line has changed...

LoopCheck := Contents->Invoiceno + Contents->Lineref

* Need to loop on same line?

If Val(Contents->Qty) > 1

   LabelCount := Val(Contents->Qty) - 2

   HoldRecord := TRUE

Endif

Return TRUE

This script ensures that the sale item is held in position until all labels are printed. If the the quantity sold is 3, then the above script will ensure that the label stays on this record for 3 iterations, before moving to the next item to print.

31. Click OK.

generate/labelt2.gif

32. Click on OK again to return to the label form.

32. Save the form.

The file invstlab.sty found in the \CAPITAL\FORMS folder contains a form created using the above set of steps.