CHAPTER 20
Technical notes


20.1 Copying data from one computer to another

On old computer

Bring up a dos prompt by choosing start then run and typing the word command. Type the following :-


cd \forbes\protax
copy *.tax a:  

cd \forbes\clients
copy *.dbf a: 

exit

On new computer

Bring up a dos prompt by choosing start then run and typing the word command. Type the following :-

md \forbes 
md \forbes\protax 
copy a:*.tax \forbes\protax 
copy a:*.dbf \forbes\clients 
exit

Alternatively you could use start/search(find) to look for *.tax in your \forbes folder and copy these across using explorer. You could then copy the client database (clients.dbf) in the \forbes\clients folder.

20.2 Using browse.exe to edit time ledgers

browse.exe is a general purpose editor for .dbf files (dbase 3). It can therefore be used to edit the tempus time ledger (time.dbf) and invoice database (invoice.dbf).

  • To run browse.exe, double click on c:\forbes\tempus\browse.exe
  • To open a database use File then Open.
  • Go to the record you are interested using the scroll bar or the next/previous buttons.
  • Edit / Find might be useful to locate the record
  • When you have made changes to a record, the Update button will appear. Press this to save the changes to the database.
  • 20.3 Creating old style icons

    With release 2003.1 we made the decision to group the many different Forbes icons into folders such as tax and company secretarial. We also added a web page style method of invoking the program. If you wish to revert to the old style icons :-

  • Click on Forbes Systems, then the Forbes icon.
  • Click on Setup (under tools).
  • Tick the box labelled "old style icons"
  • Exit
  • 20.4 Manually creating shortcuts

    20.4.1 Introduction

    This section covers creating shortcuts to our software. To create a shortcut, right click on the desktop and choose "New shortcut". The following sections detail what to fill in under target.

    20.4.2 Form based software

    All our form based software, e.g. tax returns and company forms is based on protax.exe. The shortcut target should be for example "c:\forbes\protax\protax.exe /F sa100_%d.frm". The "c:\forbes\protax\protax.exe" indicates the program. Amend this as necessary if your ProTax is installed elsewhere. The /F (forward slash followed by capital F) indicates you want a specific form loaded. The sa100_%d.frm indicates you want the sa100 for the current year. Other examples could be "sa800_%d.frm" or "ct600_%d.frm" or "p11d_%d.frm". It also possible, though not recommended to create a shortcut to a form for a particular year. For example putting sa100_05.frm after the /F would always load the 2005 return.

    20.4.3 Clientbase

    The shortcut target should be for example "c:\forbes\clients\clients.exe c:\forbes\clients\clients.dbf". The first part of the shortcut is specifying the program to run, e.g. clients.exe and the latter part which database to load. It is therefore possible to use the client database program with multiple databases.

    20.4.4 Other programs

    The other programs, the target is generally just the executable (.exe) file. for example

    capital allowances \forbes\protax\ca.exe
    protax planner \forbes\protax\plan.exe
    payroll \forbes\paye\pay32.exe
    tax office database c:\forbes\clients\clients.exe c:\forbes\protax\tax.dbf

    20.5 VT software

    In VT choose Data then Export

    In ProTax, bring up some self-employement or partnership pages and choose Edit then Paste boxes

    20.6 ProTax field names

    20.6.1 Introduction

    Each field on the form has a field name. These are used in Excel, OLE, ODBC and clipboard links and in the .tax file format.

    20.6.2 Finding the field names

    Click on a field then choose Help then Field Name. Alternatively, to view all field names on the printed form press CTRL ALT and F1 and select the Field names item from the menu. Print the return.

    20.6.3 Special field names

    The following fields do not correspond to boxes on the return

    name description example
    form the form to use sa100_00.frm
    year the year of the return 00
    subforms[x] a list of additional pages to include E 1
    rid the return ID printed along the top of each page D G Forbes 11111 22222
    barcode the barcode to print on the return -9520446678\2H\31900\1m
    modify_time a time stamp of when the return was last changed 957795649

    20.6.4 The .tax file format

    The .tax file format is a simple text file that can be opened using notepad. The entries on the form appear one per line, field name followed by one or more spaces, followed by a value. Complete a tax return and open in notepad (or choose View then Source in ProTax).

    20.8 Programming ProTax through OLE

    20.8.1 Introduction

    ProTax has an OLE automation (IDispatch) interface that allows it to be launched and controlled from languages such as VB or JavaScript.

    20.8.2 Example in VB

    Dim protax As Object
    Set protax = CreateObject("Forbes.Form")
    protax.ShowWindow
    protax.SetForm("SA100_05.FRM")             
    protax.SetField("name", "David Forbes")
    protax.SetField("address_1", "38 Station Rd")
    protax.SetField("Q10.15", "10000")
    protax.AddPages("SE", 1)
    protax.SetField("Q3.29", "50000")
    

    20.8.3 Example in Javascript

    <SCRIPT>
    function Test()
    {
    var protax = new ActiveXObject("Forbes.Form");
    protax.ShowWindow();
    protax.SetForm("SA100_02.FRM");
    protax.SetField("name", "David Forbes");
    protax.SetField("address_1", "38 Station Rd");
    protax.SetField("Q10.15", "10000");
    protax.AddPages("SE", 1);
    protax.SetField("Q3.29", "50000");
    }
    </SCRIPT>
    <INPUT TYPE=BUTTON VALUE="Click Here For Demo" OnClick="Test()">
    

    20.8.4 Field Names

    Functions such as SetField and GetField require a field name as a parameter. The field names are defined in the technical note 20.6. Alternatively the names can be found using the OLE functions GetNumberOfFields() and GetFieldName().

    20.8.5 Reference

    function parameters return description
    ShowWindow none none displays protax
    ShowFieldNames none none display the field names on the return - useful during development
    SetForm string:form none selects a form e.g. SA100_00.FRM or SA800_99.FRM
    GetNumberOfFields none integer returns number of fields on the form
    GetFieldName integer: index string: field name returns the name of the nth field
    SetField string:name, string: value none sets a field and updates display
    SetFieldData string:name, string: value none sets a field without updating display
    Update none none updates display
    Print none none prints return
    GetField string:name string:value Gets the value of a field
    LoadClient string:name none Loads a client
    SetPage integer: page number none Changes the page showing
    SetPrefix string:prefix none All setfields will be prefixed by e.g. "SE1."
    Calculate none none re calculates boxes on page
    Goto string:name none moves focus to a particular box
    SelectClient string: path none loads data
    SaveClient string: path none saves data to disk
    Addpages string:form,integer:instance none adds pages

    20.10 Adobe portable document format (PDF)

    20.10.1 Intro

    Adobe PDF format is a portable document format. PDF is a universal file format that preserves the fonts, images, graphics, and layout of any source document, regardless of the application and platform used to create it. Many documents are available in this format because anyone, anywhere can open a PDF file. All you need is free Adobe Reader software.

    20.10.2 Viewing

    To view these documents you can use the free Acrobat reader from Adobe. In all likelyhood this is already installed on your machine and you will probably have viewed pdf files before. If you think you need the pdf viewer, visit www.adobe.com.

    20.10.3 Creating PDF files

    To create PDFs you need more than just the basic Adobe viewer. PDF writers are available from many different companies, with varying degrees of quality of output. Adobe distiller, the seminal software, is availabe for around £195. There are a number of cheaper alternatives which are listed below. The pdf creator installs as a 'virtual' printer. This means that whatever software you are using, if it is capable of printing, it can produce pdf files. When you have completed your document, e.g. a ProTax tax return, or an excel spreadsheet, just go to file, then print, and select the pdf creator rather than your default printer.

  • www.broadgun.com
  • www.pdf995.com
  • 20.11 PDF import

    See section 20.10 for more information of on Adobe PDF format. The pdf program described below, enables you to view a pdf file and then extract data using input masks.

  • Copy the Pdf folder from your CD to your forbes folder - i.e. c:\forbes\pdf.
  • Double click on pdf.exe.
  • Load the pdf you have created from the tax return.
  • Choose Tools / Create tax return.
  • If prompted to carry data forward to a subsequent year e.g. 2004, choose NO.
  • 20.12 XML Format

    ProTax supports an xml format for tax returns. They can be read simply by choosing File Open or passing the path on the command line.


    < Form  type =" sa100_05.frm "  year =" 05 " >
       < S01  prefix =" E1. "  type =" E "  name =" Employment "  iddesc =" Forbes Computer Systems Ltd "  color =" #ff0080 "  instance =" 1 " >
          < Boxes >
             < Q1.2 > Forbes Computer Systems Ltd </ Q1.2 >

             < Q1.5.1 > 65 High Street </ Q1.5.1 >

             < Q1.5.2 > Woburn Sands </ Q1.5.2 >

             < Q1.8 > 10000 </ Q1.8 >
    </ Boxes >
    </ S01 >

       < TF  name =" Main Return " >
          < Boxes >
             < Address_1 > 38 Station Road </ Address_1 >

             < Address_2 > Woburn Sands </ Address_2 >

             < Address_3 > </ Address_3 >

             < Address_4 > </ Address_4 >

             < Address_5 > </ Address_5 >

             < name > David Forbes </ name >

             < Q1 > Y </ Q1 >

             < Q10.0 > Y </ Q10.0 >

             < Q10.2 > 10000 </ Q10.2 >

             < Q10.3 > 2500 </ Q10.3 >

             < Q10.4 > 12500 </ Q10.4 >

             < tax_reference > 1111122222 </ tax_reference >
    </ Boxes >
    </ TF >
    </ Form >