RISCWorld Cheque Printer
Dave Holden covers our exclusive software...
This program was written primarily in response to a series of requests on c.s.a.apps from people who were looking for something that would let them print a series of cheques from data in the form of a CSV file produced by a spreadsheet.
In fact, the program doesn't actually print cheques. Instead it produces output in the form of Drawfiles (which can, of course, be dragged directly to the printer icon on the iconbar) or as data which can be loaded directly into a suitably formatted file in Impression or Ovation Pro, from where the cheque or cheques can be printed in the usual way.
Using the program.
At it's simplest it can be used to print a single cheque.
Run the program in the usual way by double-clicking on it. Now either click SELECT on the icon bar icon or select Direct input from the iconbar menu. The window shown below will open.
Enter the amount in the field at the top left. If it's more than £1000 don't try to include a comma separator, the program will do this automatically. Use a full stop to separate pounds from pence (if any).
The only other data you need to enter is the payee's name. This is entered in the large icon labelled Payee (long). At the bottom left of the window are three radio buttons which set the type of output. By default this is a Drawfile, so now click on the OK button and a small SaveAs window will open. Drag the Drawfile icon in this window either to a filer window or to !Draw.
If you examine this file in !Draw you will see that it comprises an A4 portrait file with a series of vertical lines of text. These will be today's date, the payee, the amount to be paid in text, and the amount to be paid in figures. These should all be in the correct locations so that when you place a cheque in the printer the various items are printed in the correct place on the cheque. Since all cheques are different you will inevitably need to 'tweak' the layout to suit yours, and this will be described later.
You will probably be wondering what the other two fields, marked Number and Payee (short) are for.
Number is for you to enter the number of the cheque you are going to print. Obviously this won't be printed, but the program can keep a logfile of every cheque printed, and this number will appear there.
The 'Up' and 'Down' bump icons increase and decrease the cheque number by one. This saves retyping the number if you are printing two or more cheques with sequential numbers.
Payee (short) is used if you are printing the counterfoil as well as the actual cheque (more about this later). Since space on the counterfoil is rather limited you may wish to abbreviate the name printed there and so if you enter a shortened version of the name here that will appear on the counterfoil. If you don't then only the first ten characters of the payee's name will be printed.
If you press Return with the caret in any of the fields the caret will move to the next field. Pressing Return with the caret in the last, Payee (short), field is equivalent to clicking on OK and will open the Save window.
The two other buttons on the bottom left of the window select output suitable for Ovation Pro or Impression Publisher. These files must be dragged into a specially formatted document window in their respective programs and this method is really more suitable for printing multiple cheques.
If you click ADJUST on the icon bar icon or select From file from the icon bar menu the following window will open.
This window is similar to the one previously described but as it takes its input from a file the only writable icon is the one where you can enter the number of the first cheque. If you do enter a number here it will be incremented automatically with each cheque.
To use this window you should drag a correctly formatted Text or CSV file to it. The file will be loaded and it's filename will appear in the top icon. Once this has been done, and when you have selected the type of output file you want, click on OK and, as before, a SaveAs window will open. The number of records found in the file and hence the number of cheques to be printed will be shown.
Note that with this window the DrawFile output will not be a single file but a series of DrawFiles inside a directory, sequentially numbered, one for each cheque. If you have entered a cheque number then these filenames will be the numbers of the cheques, if not they will start at '001'.
Input file format
The CSV file can have either two or three fields per line. The first field in the payee's name, the second is the amount to be paid. the third field, if present, is a 'short' version of the payee's name to be used on the cheque stub.
The file should look something like this -
John Smith,123.45 Consolidated Rhubarb,1046.27,Con.Rh.
The Text file should have each entry separated by at least one blank line. Each entry should consist of either two or three lines. The first line is the payee's name, the second line the amount to be paid, and the third line, if present, a 'short' version of the payee's name.
The following shows the same data as the example above in text file form.
John Smith 123.45 Consolidated Rhubarb 1046.27 Con.Rh.
You will see that the examples don't have a leading £ or a comma after the thousands in the cash field. Don't worry if you are exporting data from a spreadsheet or other program that normally includes these, they will be dealt with properly.
You will see from the examples that with either type of file it doesn't matter if two and three field entries are mixed within the same file.
The Choices window.
This is opened by selecting Choices... from the iconbar menu.
It is actually rather important because from here you set most of the parameters that define how the program operates.
The top three lines of icons set which type of file is selected by default and the exact layout of each type of file. The 'template' file that will be used for each type is shown and clicking on the menu icon to the right of the name will open a menu showing which templates are available. For example, if you click on the menu icon of the top item, the Drawfile template, you'll see this menu.
The 'Large' and 'Small' refer to the two sizes of cheque in most common use, Small being the standard personal account cheques and Large being the larger cheques for business accounts. '+CF' in each case means 'with counterfoil'.
If you select an item from this menu its name will appear in the window. The menus for Ovation Pro and Impression have only two items, 'Cheque+CF' and 'ChequeNoCF'. There is no 'Large' and 'Small' as the size and layout is set in the actual Ovation Pro and Impression documents, as will be described later, so these files are merely 'script' files and not actual templates.
We will return to these files later as you will inevitably need to edit them to ensure that the data is printed in the correct place to suit your particular cheques.
The item Split cash string at is used primarily for Drawfiles. Cheques have two lines for you to write the amount to be paid, and with Ovation Pro or Impression, as long as the text frame in which this is placed is the correct size, the text will 'wordwrap' onto the second line if necessary. Draw can't do this, so the text must be split between two separate text objects. The value in this icon therefore sets the maximum number of characters permitted in the top line, the remainder being printed in the second.
Keep logfile will make the program keep a log of each cheque in a text file called LogFile. This enables you to keep track of your cheques. By default this is saved inside the !Cheque application directory, however its location is defined by the OS variable ChequeLogfileLocation$ which is set in the program's !Run file. If you'd rather have it appearing in the same directory as the !Cheque application, that is, outside the application directory, then load the !Run file into a text editor and follow the instructions you will see there for altering it. Of course, it can be located anywhere, just set the variable to wherever you want it to be.
Each line in the LogFile is in the form -
<cheque number> <date> <amount> <payee>
When you have set the various options clicking on OK will set them temporarily. Clicking on Save will set them and also save them as a your default choices next time you run the program. Clicking on Cancel will close the window without setting any of the options.
At present the date printed on the cheque and in the logfile is in a fixed format, namely -
where 'dd' is the day of the month, 'Mon' is the month abbreviated to three letters and 'yyyy' is the year. This date is taken from the computer's clock, so make sure this has its date set correctly or the date on your cheques will be wrong.
This format was chosen because it is unambiguous so that there can be no confusion between day and month as can happen if it is written all in figures.
Use with Ovation Pro and Impression
The output from the program when you select Ovation Pro or Impression format is in the form of a text file with control codes for Impression and a skeleton DDL file for Ovation Pro. These files cannot be used on their own but must be introduced into a suitable document in their respective programs.
Three files are included with the program. The Impression file has two different Master Pages, one for small cheques and one for large. Use the Alter Chapter dialogue to select the one you want to use. If you need to use both then it might be more convenient to save two separate files, one with Large as the standard master Page and one with Small.
In either case drag the output file from the !Cheque program to the top left hand frame on the first page of the document, the frame with the large arrow pointing to it in the illustration below.
You will see that the various frames on the page correspond to the fields that need to be filled in on the cheque. The three on the left hand side are the counterfoil, if you have selected the script file without counterfoil these will be left blank. The rest of the data will flow automatically into the correct frames and, if there is more than one cheque, will continue onto the following pages so that you have one cheque per page.
You can then just load your printer with blank cheques and print the document in the usual way.
Printing the cheques
The cheques are printed in 'landscape' mode as this method is suitable for most laser and inkjet printers. The layout used requires the cheque to be 'centered'. Most modern laser printers have a pair of paper guides which keep the paper centred no matter what the width. Inkjet printers frequently have only one movable guide, so the paper can't easily be centered. If you have a printer of this type you will need to alter the template files to suit.
A problem with many inkjet and a few laser printers is that they can't print close to the bottom of a page. Sometimes no closer than 20 mm. This is obviously a problem when printing cheques as the 'bottom' of the cheque as it is printed is the left hand side of the cheque as you look at it normally.
If you have a printer that can't print close to the bottom of the page then, when printing cheques, you will need to ensure that the payee and amount to be paid fields are positioned a suitable distance from the left hand side of the cheque. If the printer you are using is unable to print close to the bottom of the page then it may not be possible for you to move the fields on the counterfoil sufficiently far to enable them to be printed.
The photo below shows a cheque in the input tray of a Hewlett Packard laser printer ready to be printed. You can see from this the orientation required. For an inkjet printer it's the same, that is, the cheque is placed in the paper feed tray with its actual right hand end towards the printer, which will be down with the vertical paper try used on most inkjets.
Altering the layout
The various fields on the cheque templates will, quite probably, not be in the correct place for your cheques. I have looked at a variety of cheques from several banks and they all seem to be slightly different. It's very easy to make the necessary adjustments. With Ovation Pro and Impression you simply load the document and move the required frames on the Master Page. With Impression this is done by selecting View -> Master pages from the document menu. With Ovation Pro select Page -> Edit master page.
The templates for the various Draw options are ordinary Drawfiles and these can be modified in !Draw in the usual way. If you open the !Cheque application directory (hold down Shift and double-click on the application icon) you will see a sub directory Templates. This is where these files, and the script files for Ovation Pro and Impression, can be found. However, you don't actually need to delve into the application's innards to modify the file. In the Choices window there is a button to the right of each of the menu buttons. If you click on the one for the Draw option it will load the currently selected Drawfile template into Draw. When you've finished altering it just select Save from !Draw's menu and it will be saved back into its original location.
You can add extra files into these directories if you wish. This may be necessary if you have other cheques with different layouts. Any files placed in these directories will appear on the appropriate menu in the Choices window and can be selected in the usual way.
The script files
Unless you understand how Impression RTF files and Ovation Pro DDL files operate it is probably best not to alter these files. However, you will see that the Drawfiles have certain 'tags' in the fields and it is these which are interpreted by the program to tell it where to place the data in the file. These tags are all upper case and all begin with the '\' (backslash) character followed by three letters. They are -