Flexible Report Writer 2016

Flexible Report
Writer 2016
06/09/2016
Important Notice!
Every effort has been made to ensure that this User Manual is accurate at the time of
printing; however there may be some inaccuracies due to the continuous improvements
made to the module.
An updated User Manual may be available for download from HandiSoft’s Internet site
http://www.sage.com/au/support-services/software-support/handisoft-knowledgebase/usermanuals.
The following Licence Agreement will appear as a splash screen prior to the installation of the Software.
Licence Agreement
Important - Read Carefully: Permission to use this Software is conditional upon you, the customer, agreeing to the terms set out
below. By passing beyond the splash screen, installing, copying, downloading, accessing or otherwise using the Software, you
agree to be bound by the following terms. If you do not agree to the terms, do not pass beyond the screen, install, copy, download,
access or otherwise use the Software but promptly return this Software and any accompanying materials to Sage or its Authorised
Distributor with proof of payment, and any Licence Fee you have paid will be refunded to you.
This licence agreement may be amended or replaced in its entirety at any time to facilitate changed operating conditions. In the
event this occurs, the then current licence agreement will be the prevailing version. A copy of the operating licence agreement may
be accessed from within the Licences tab in any Sage module.
Copyright
© Sage Software Australia Pty Ltd 2016. All rights reserved.
Copyright in the Software and in the Documentation is owned by Sage Software Australia Pty Ltd . ("Sage"). No part of the
Software or the Documentation may be reproduced or copied in any form or by any means (graphic, electronic or mechanical,
including photocopying, recording, taping or information storage and retrieval systems) without the prior written permission of Sage
Software Australia Pty Ltd .
The copyright in the Software and the Documentation is protected by Australian national copyright laws (including the Copyright
Act 1968 (Cth)) and by international copyright treaties.
1. Words with defined meanings
1.1
Unless defined elsewhere in this Agreement, a word or expression starting with a capital letter has the meaning given to
that word or expression set out in clause 15 of this Agreement.
2. Disclaimer
2.1
You acknowledge that you have sought independent professional advice in relation to the Software and Documentation,
and that you are not relying on the advice or judgment of Sage. To the extent permitted by law, the Software and the
Documentation are provided on the basis that:
(a)
Sage, its officers, employees, contractors, agents and Authorised Distributors are not responsible for the results of
any actions taken by you in reliance on information in the Software or Documentation, nor for any error or omission
in the Software or Documentation;
(b)
Sage, its officers, employees, contractors, agents and Authorised Distributors are not engaged in and do not
represent by providing the Software and Documentation that they are providing any legal, accounting, professional
or other advice or services; and
(c)
2.2
Sage, its officers, employees, contractors, agents and Authorised Distributors are not responsible for the results of
any actions taken by you in reliance on information contained in any third party software or data, embedded in or
provided in conjunction with the Software or Documentation, nor for any error or omission in such third party
software or data.
Connected Services
In order to provide a more comprehensive offering of Sage Software, Sage discloses that there may be Third Party
Software Products or Services which are embedded into this module that may link to sources operated by other external
parties (Connected Services). Notwithstanding that the Third Party may be affiliated with Sage, Sage has no control over
these externally linked sources, all of which have their own separate terms and conditions including privacy and data
collection practices. You will be responsible for all fees and charges associated with the Connected Services and must do
anything (including executing a document) that the external party reasonably requires giving full effect to the Connected
Services and the transactions it contemplates.
© Sage Software Australia Pty Ltd
3
Licence agreement
Flexible Report Writer 2016
3. Grant of rights
3.1
Subject to your payment of the Licence Fee, Sage grants to you a non-exclusive licence ("Licence") during the Term to use
the Software and Documentation at the Site, for your own internal purposes only, on the terms and conditions set out in
this Agreement.
3.2
The Licence entitles a single accounting practice to install and operate the Software for one site of access only,
notwithstanding it may be connected with other associated branches, affiliates and subsidiaries through a central server
and/or a hosting environment, and is limited to the number of concurrent network Users specified on the Invoice and the
Software for that particular Site. You must purchase the Software for each location and site of access. In the avoidance of
doubt, the Licence is Site- specific and individual accounting practice must have its own individual Licences.
If there is a limit to the number of Users of the Software, number of networks, or other restriction specified on the Invoice
and in the Software, or otherwise imposed upon the Licence under this Agreement, the Licence to use the Software will be
restricted accordingly. You may only increase the limits specified in the Invoice or Licence by paying such fees as are
applicable to the increased limits. No reduction of Licence Fees will be provided in the event any limits are reduced during
the Term.
3.3
3.4
If your accounting practice shares offices with another unrelated accounting practice, both accounting practices must
purchase the Software in their own right, even if the parties share a common computer system.
4. Duration of agreement
4.1
This Agreement commences on the date of its acceptance by you and will continue in effect until the expiry of the current
financial year on 30 June ("Term"), unless extended in accordance with clause 4.2, or terminated in accordance with
clauses 4.3, 4.4 or 12.
4.2
Subject to clauses 4.3 and 4.4, you may extend the Term for further one year periods by paying the then current Annual
Renewal Fee for the extended period in accordance with clause 8.
The current Annual Renewal Fee must be paid, or arrangements for payment acceptable to Sage made, by the due date
specified by Sage for the Term to be extended.
4.3
4.4
Without limiting any other right to terminate this Agreement under clause 12, Sage may terminate this Agreement upon
expiry of any financial year, by giving you written notice on or before expiry of the then current financial year. Sage will not
unreasonably terminate this Agreement.
5. Your obligations
5.1
You are not permitted to purchase the Software with an additional tax agent reference number for use by another tax agent
without Sage’s written consent.
5.2
Subject to this Agreement, and to any non-excludable provisions at law (including the Copyright Act 1968 (Cth)), you must
not, and must not allow or cause any other person to:
(i)
print, copy or reproduce the Software or Documentation by any means or in any form other than to make one copy
of the Software for back-up and security purposes;
(ii)
give, lease, rent, lend, assign (other than as expressly permitted under this Agreement), licence, sub-licence,
transfer, distribute, disclose, disseminate, or publish the Software in any form to any other person or attempt to do
any of these acts;
(iii)
modify, adapt, alter, reverse engineer or decompile the Software; or modify or change the database other than
through use of the Software;
(iv)
create or recreate, or attempt to create or recreate, the source programs, object programs or any other aspect of
the Software in whole or in part.
(v)
access, install or use the Software other than at the Site in accordance with this Agreement;
(vi)
5.3
use the Software for sublicensing, timesharing, rental, facility management, service bureau usage, or third party
training purpose.
You agree to indemnify and keep indemnified Sage, its officers, employees, contractors, agents and Authorised
Distributors against any loss or damage incurred by them as a result of use of the Software or Documentation by you, your
employees, contractors or agents that is not in accordance with this Agreement.
6. Configuration and installation
6.1
The Software may only be installed on a computer at the Site.
6.2
The Index File provided with the Software is specific to you, the Licensee. Any change will require a new Index File. You
must not circumvent the Index File system needed to operate the Software, or use an index file which has not been
provided to you by Sage.
7. Use of software and documentation
7.1
7.2
7.3
4
Subject to your payment of the Licence Fee, applicable taxes and any other fees specified in the Invoice in full, upon
installation of the Software pursuant to clause 6, you may use the Software and Documentation in accordance with the
terms of this Agreement.
You must, upon receiving a written request from Sage, allow Sage to access the Site, during ordinary business hours, as
reasonably necessary to audit your compliance with the terms and conditions of this Agreement and the restrictions in
clauses 3 and 5.
If the Term of this Agreement is not extended in accordance with clause 4.2, the Licence will automatically terminate on the
expiry of the then current Term, and you acknowledge and agree that no further notice is required to you from Sage to
effect such termination.
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Licence agreement
8. Fees
8.1
You must pay the Licence Fee, applicable taxes and any other fees listed in the Invoice in full.
8.2
You acknowledge that a Deposit, if taken, is non-refundable in the event that you do not pay the Balance or proceed with
installation of the Software in accordance with clause 6.
8.3
The Annual Renewal Fee is invoiced annually in advance for each financial year commencing 1 July in the relevant year
and ending 30 June in the subsequent year. Each year, on or before 1 July, Sage may increase the Annual Renewal Fee.
You must pay the Annual Renewal Fee on or before 1 July of each year of the Term.
Without limiting any other right or remedy of Sage or its Authorised Distributors, interest on overdue amounts is payable by
you at the rate of 15% per annum, from the date the amount became overdue until it is paid in full, inclusive of interest.
Interest accrues daily.
8.4
9. Intellectual property rights
9.1
9.2
9.3
All Intellectual Property Rights relating to or subsisting in the Software and Documentation, including all enhancements,
modifications, alterations, customisations or adaptations to the Software (whether created by Sage or any other person),
remain the property of Sage. The Licence granted under clause 3 does not make you the owner of the Software or
Documentation nor does it cause any transfer of Intellectual Property Rights relating to or subsisting in the Software or
Documentation.
You must not alter, change, remove, obscure or otherwise effect any modification to any notice or other indication of
Sage’s ownership of the Software and its Documentation or of its Intellectual Property Rights relating to or subsisting in the
Software and Documentation.
You must ensure that each copy of the Software and Documentation in your possession bears such notices relating to
Sage’s ownership of the Software and Documentation and of its Intellectual Property Rights relating to or subsisting in the
Software and Documentation as Sage may direct. In the absence of any specific direction by Sage, you must ensure that
all notices appearing on the Software and Documentation are reproduced and maintained in their entirety on all copies
made by you.
10. Updates, software maintenance and support, and third party software and data
10.1
You acknowledge that Sage has no obligation to develop Updates. During the Term you may receive Updates (if any) for
the Software, including instructions and/or Documentation that Sage considers reasonably necessary to assist in a smooth
transition for use of any Update. Updates may include revisions to Documentation. Unless you have subscribed to the
optional CD update services, you must have internet and email access for Updates to be supplied to you.
10.2
If Sage provides you with an Update:
(i)
ii)
10.3
10.4
10.5
10.6
10.7
10.8
10.9
10.10
the terms of this Agreement will continue to apply in all respects to the Update which will be deemed to be the
Software or Documentation for the purposes of this Agreement;
if requested by Sage, you must return the Software and Documentation (and all copies) that was used prior to the
Update to Sage, or otherwise deal with it in accordance with Sage’s reasonable directions.
Sage may, in its absolute discretion, withhold or refuse to provide support and maintenance if you have failed to install,
within a reasonable time, all available Updates provided in respect of the Software.
Technical support and Updates will only be supplied so long as the Software is used under conditions and on operating
environments for which the Software is designed.
The technical support provided under this Agreement is limited to telephone and email support of the Software by Sage
during normal business hours. There may be times when you allow our Support Consultant to connect to your computer
remotely. The remote access is purely for the Support Consultant to quickly demonstrate tasks that would otherwise take
too long to explain. Remote access is not generally used to have a Support Consultant complete processes. Whilst all
reasonable efforts shall be made to ensure a secure environment, Sage offer no guarantee and provide no warranty
(express or implied) that the remote access to your computer will be secure or private. Sage accepts no liability for any and
all security incidents, including any loss or damage suffered by you arising out of any failure to protect your data, network,
systems, software or equipment.
If you require any additional technical support not covered under this Agreement, including telephone, onsite or online
support, Sage may, in its absolute discretion, provide that additional technical support to you at its then current rates for
such services.
Any supplemental software code provided to you as part of the support services shall be considered part of the Software
and subject to the terms of this Agreement.
You must provide Sage with reasonable assistance as requested by Sage for the purpose of providing you with
maintenance and support.
If, in the course of obtaining maintenance and support services from Sage, you provide any personal information about an
individual, including, personal information about any officer or employee, then you warrant that in providing such personal
information you have complied with your legal obligations under the Privacy Act 1988 (Cth.), including the National Privacy
Principles in Schedule 3 of that Act.
You consent to Sage using any technical or confidential information which you provide to it:
(i)
to enable Sage to perform maintenance and support services; and
(ii)
for its business purposes, including for the purpose of product support and development.
Sage agrees not to use such technical information in a form that personally identifies you, or where such information is
comprised of information identified by you as ‘confidential’ or subject to privacy laws, prior to consent being provided by
you.
10.11
Sage is not required to support any third party software or data, whether or not the third party software or data is provided
by Sage in connection with your use of the Software.
© Sage Software Australia Pty Ltd
5
Licence agreement
Flexible Report Writer 2016
10.12
If Sage provides you with any third party software or data, then your use of that third party software or data is subject to
such terms as may be imposed by the relevant third party and must only be used for the purposes for which it is provided.
10.13
You agree that Sage is not liable or otherwise responsible if a third party changes the terms (including as to payment) on
which it licences any software or data. Without limiting the foregoing, it is your responsibility to pay any fees associated
with your use of such third party software or data.
Notwithstanding any other provision of this Agreement, you agree to indemnify and keep indemnified Sage, its officers,
employees, contractors, agents and Authorised Distributors against any third party claim or action (including but not limited
to reimbursement of legal costs), loss, damage, or expense incurred by them as a result of a failure by you, your
employees, contractors or agents to comply with this clause 10.
10.14
11. Warranties and limitation of liability
11.1
Sage warrants that:
(i)
it has the full right, power and authority to enter into and perform this Agreement; and
(ii)
11.2
to the best of its knowledge, the use by you of the Software or Documentation in accordance with this Agreement,
will not infringe the Intellectual Property Rights or moral rights of any person, and Sage indemnifies and agrees to
keep you indemnified from and against any loss, damages and expenses, including but not limited to, reasonable
legal fees which you may suffer and incur as a result of any claim, action or proceeding arising directly from any
breach of the warranty contained within this clause, provided that Sage is not liable for any indirect, consequential
or economic loss or damage suffered by you in connection with this Agreement.
You acknowledge that:
(i)
the Software was developed without consideration of your objectives and needs; and
(ii)
11.3
11.4
11.5
software in general is not error-free, and agree that the existence of errors in the Software will not constitute a
breach of this Agreement by Sage.
Sage provides the Software and Documentation "as is".
Except as expressly provided in this Agreement, no warranties are made with respect to the Software or Documentation by
any person, including but not limited to Sage, any of its officers, employees, contractors, agents and Authorised
Distributors.
In the event any third party software or data is provided with or embedded in the Software, notwithstanding anything to the
contrary, no warranties are made by Sage, its officers, employees, contractors, agents, or Authorised Distributors, with
regard to such third party software or data, including but not limited to its accuracy or reliability.
11.6
To the extent permitted by law, Sage or any of its officers, employees, contractors, agents or Authorised Distributors will
not be liable to you for any loss, costs, expenses or damages incurred by you as a result of using the Software and
Documentation.
11.7
Notwithstanding any other term in this Agreement, to the extent that consumers have the benefit of certain rights or
remedies under the Trade Practices Act and similar state and territory laws in Australia, in respect of which liability may not
be excluded, then to the maximum extent permitted by law, such liability is limited, at Sage’s option, to:
(i)
in the case of the Software, Documentation or other goods supplied under this Agreement:
A. replacement of the goods; or
B. correction of defects in the goods; or
(ii)
11.8
11.9
11.10
C. the cost of having defects in the goods corrected; or
in the case of services provided under this Agreement, replacement of the services.
To the extent permitted by applicable law, Sage or any of its current or former officers, employees, contractors, agents or
Authorised Distributors (Those Indemnified) will not be liable for any direct, indirect, general, special, incidental or
consequential damages arising out of or in any way related to the provision of any goods or services by Sage or Those
Indemnified, pursuant to this Agreement and including your use of or inability to use the Software or Documentation, even
if Sage or any of Those Indemnified have been advised of the possibility of such consequence.
You acknowledge that any times quoted for delivery and installation of the Software and/or performance of maintenance
and support services are estimates only, and that Sage accepts no liability whatsoever for failure to meet those estimated
times.
You acknowledge that you are responsible for ensuring that your operation of the Software does not breach any laws, or
obligation of confidentiality or privacy owed to any person, and for maintaining the security of any databases which are
accessed, used or managed by the operation of the Software. You indemnify and keep indemnified Sage against any
action, proceeding, claim, loss, injury or expense arising out of any failure by you to comply with your obligations in this
clause
12. Termination
12.1
12.2
6
This Agreement may be terminated immediately by written notice from Sage in any of the following circumstances:
(i)
if you are in breach of any term of this Agreement;
(ii)
if you, being a corporation, become the subject of insolvency proceedings;
(iii)
if you, being a firm or partnership, are dissolved;
(iv)
if the Software is otherwise outside your effective control; or
(v)
if there is a change in ownership which effectively alters control of you.
You may terminate this Agreement by notice in writing to Sage in the event that Sage has breached a material term of this
Agreement and failed to rectify such breach within 30 days of a notice requesting Sage to do so.
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
12.3
12.4
Licence agreement
Upon termination of this Agreement:
(i)
the Licence is revoked; and
(ii)
you must immediately pay all fees, charges or other payments owing under this Agreement; and
(iii)
you must either destroy or return any remaining copies of the Software and Documentation, in the manner directed
by Sage; and
(iv)
you hereby grant Sage a licence to enter upon the Site(s) at which copies of the Software and Documentation may
be situated and remove same in the event of non-compliance with the above subclause, and you must render all
reasonable assistance to facilitate this action.
Termination of this Agreement will be in addition to any other remedies which either party may have under this Agreement
or otherwise and does not affect any rights or obligations that had accrued at the time of termination.
13. Governing law and jurisdiction
13.1
This Agreement and the transactions contemplated by this Agreement are governed by the law in force in Western
Australia.
13.2
Each party irrevocably and unconditionally submits to the non-exclusive jurisdiction of the courts of Western Australia and
courts of appeal from them.
14. General
14.1
14.2
14.3
14.4
If you purchase any additional modules of the Software from Sage, increase the limits under clause 3.3 of this Agreement,
or if Sage otherwise agrees to alter the configuration of the Software, then the terms of this Agreement will continue to
apply to your use of the Software as reconfigured.
You acknowledge that in entering into this Agreement you have not relied on any representations or warranties about its
subject matter except as expressly provided by this Agreement.
This Agreement constitutes the entire agreement of the parties about its subject matter and supersedes all previous
agreements, understandings and negotiations on that subject matter.
You may assign your rights and obligations under this Agreement with the prior written consent of Sage, provided that the
assignee executes a deed of novation pursuant to which it agrees to be bound by the terms of this Agreement..
14.5
A party may exercise a right, power or remedy at its discretion, and separately or concurrently with another right, power or
remedy. A single or partial exercise of a right, power or remedy by a party does not prevent a further exercise of that right,
power or remedy or an exercise of any other right, power or remedy. Failure by a party to exercise or delay in exercising a
right, power or remedy does not prevent its exercise. A party is not liable for any loss caused by the exercise or attempted
exercise of, failure to exercise, or delay in exercising the right, power or remedy.
14.6
A provision of, or a right created under this Agreement may not be waived or varied except in writing, signed by the party or
parties to be bound.
14.7
The rights, powers and remedies provided in this Agreement are cumulative with and not exclusive of the rights, powers or
remedies provided by law independently of this Agreement.
14.8
Neither party is liable for any breach of its obligations under this Agreement (other than an obligation to pay any moneys or
to indemnify) if the breach resulted from a cause beyond its reasonable control.
14.9
If any provision of this Agreement is held to be invalid, unenforceable or illegal for any reason, this Agreement will remain
otherwise in full force apart from such provision which will be deleted.
14.10
Each indemnity in this Agreement is a continuing obligation, separate and independent from the other obligations of the
parties and survive the termination of this Agreement.
14.11
Clauses 2, 5, 9, 10, 11, 12, 13, 14, and any other clause which by its nature is intended to continue, shall survive the
termination of this Agreement for any reason.
15. Definitions and interpretation
15.1
The following words have these meanings in this Agreement unless the contrary intention appears.
Agreement means this Agreement as it may be amended from time to time by written agreement between the parties.
Annual Renewal Fee means the fee designated as such in the Invoice, as amended by Sage from time to time in
accordance with clause 8.3.
Authorised Distributor means an entity appointed by Sage to maintain and support the Software and Documentation.
Balance means the residue of the Licence Fees payable after the deduction of the Deposit.
Deposit means the agreed amount of the Licence Fees initially payable in accordance with the Invoice..
Documentation means all manuals, handbooks, and other material, whether in hard copy or electronic form, in relation to
the Software and its use, and provided by Sage under this Agreement.
Licence Fees means the total fees specified in the Invoice.
Sage means Sage Software Australia Pty Limited ABN 40 071 007 326.
Intellectual Property Rights means all intellectual property rights of whatever nature including all rights conferred under
statute, common law or equity, including, without limitation, all copyrights, patent rights, trade mark rights, design rights,
trade secrets, and all other intellectual property as defined in Article 2 of the Convention Establishing the World Intellectual
Property Organisation of July 1967.
Licence Fee means the fee designated as such in the Invoice.
Index File is an unlock key which allows access to the nominated Software modules and specified number of concurrent
network Users to access the Software.
© Sage Software Australia Pty Ltd
7
Licence agreement
Flexible Report Writer 2016
Invoice means Sage’s or the Authorised Distributor’s standard form invoice as sent to you in relation to your ordering of
the Software or Updates.
Site means the geographical location of access address specified in the Invoice.
Software means the object code version of the suite of computer programs known as the ‘Sage Software’, as detailed in
the Invoice and includes any Updates provided to you under this Agreement.
Updates means an executable file that modifies the Software by correcting bugs or errors, or by making minor
improvements to the functionality of the Software, and includes new versions of the Software which Sage generally makes
available to licencees of the Software that have entered into an agreement with Sage and paid the relevant Annual
Renewal Fee. Updates do not include any new products, including new products based on the Software, which are
licensed separately, and for which an additional charge, separate to the Annual Renewal Fee, is payable.
User means a person accessing any part or all of the Software at any given point in time. For the avoidance of doubt, any
background tasks created or spawned by an individual user is not to be treated as a separate user. If, however, a
background task or process created by a particular individual user is still running then that individual user is deemed to be
accessing the Software at that point in time.
15.2
15.3
In this Agreement unless the contrary intention appears:
(i)
(ii)
the singular includes the plural and vice versa;
a reference to a statute, ordinance, code or other law includes regulations and other instruments under it and
consolidations, amendments, re-enactments or replacements of any of them; and
(iii)
a reference to "you" is a reference to the customer specified in the Invoice.
Any marginal notes or headings are included for convenience and do not affect the interpretation of this Agreement.
Information regarding additional agents
To protect your interests we wish to clarify several situations where you need to exercise care:

The licence entitles a single accounting practice to install and operate the Software for one site of access. At that one
site of access, you may operate the Software at the same time subject to the limits of the total number of concurrent
network user licences you have purchased for use during the Term. To clarify:

You must purchase the nominated Software for each site of access. For example, if you had two branches (Sydney
and Melbourne) and the software was installed only at Sydney, and the Melbourne branch remotely accesses the
Sydney installation, then you must purchase the nominated Software twice.

If your practice shares offices with another accounting practice, and the practices are not in partnership, both
accounting practices must purchase the nominated Software in their own right. This is the case, even where you
share a common computer system.

Where a client purchases an additional tax agent reference number, this is not an additional licence. It is simply an
addition to your program to lodge tax returns under another tax agent name and number. It in no way allows you, the
licence holder, to give a copy of the Software to the additional tax agent. You are not permitted to purchase the
Software with an additional tax agent reference number for use by another tax agent without Sage's written consent.
Connected Services Terms of Use
By accessing or using Sage’s Connected Services, you acknowledge and accept the following Terms of Use.
Sage may at any time amend this Terms of Use and the Licence Agreement without notice.
Disclaimer
8

Sage does not represent or warrant that the above Connected Service (herafter “Service”) or the Customer's use
thereof will be uninterrupted or error-free, that defects will be corrected, or that the Service or the server that makes it
available are free of viruses or other harmful components.

Sage does not warrant or represent that the use or the results of the use of the Service or the materials made
available, as part of the Service will be correct, accurate, timely, or otherwise reliable.

Sage shall not be responsible for unauthorised access to or alteration of transmissions or data, any material or data
sent or received or not sent or received, or any transactions or agreements entered into through the use of the
Service.

The Customer specifically agrees that Sage is not responsible for any content or data sent using and/or included in
the Service.

Sage and/or its suppliers, shareholders, directors and employees make no representations about the suitability,
reliability, availability, timeliness, security and accuracy of the Service for any purpose. The Service is provided "as is"
and without warranty of any kind. Sage hereby disclaims all warranties and conditions with regard to the Service,
including all implied warranties, fitness for a particular purpose, title and non-infringement.

In no event shall Sage and/or its suppliers, shareholders, directors and employees be liable for any direct, indirect,
punitive, incidental, special, consequential damages or any damages whatsoever including, without limitation,
damages for loss of use, data or profits, arising out of or in any way connected with the use or performance of the
Service, with the delay or inability to use the Service, the provision of or failure to provide the Service, whether based
on contract, tort, negligence, strict liability or otherwise, even if Sage has been advised of the possibility of such
damages. The Customer's sole and exclusive remedy is to discontinue using the Service
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Licence agreement
ELS-SBR Embedded Client Software
You acknowledge and agree that ELS- SBR Embedded Client software is not a proprietary software belonging to Sage Software
Australia and that you agree to comply with the following:
ELS-SBR Embedded Client end user licence
This financial and accounting software includes ELS-SBR Embedded Client software (Software) sourced from the ATO. Subject to
the following, you may:

use the Software (in unmodified form) solely as part of this financial and accounting software, and

make copies of the Software for back-up purposes only.
All other rights in the Software are reserved. In particular, you may not (under this end user licence):

sub-licence or distribute the Software in whole or in part,

decompile, reverse engineer, disassemble or reproduce the source code for the Software, or

modify the Software in any way (including by removing any copyright or notice files).
Requests for other uses of the Software can be sent by e-mail to [email protected].
This end user licence terminates automatically if you fail to comply with any of these end user licence provisions. The laws in force
in the Australian Capital Territory apply to this end user licence.
Software product information
The ATO:

provides the Software “as is” and without charge;

gives no express or implied warranties (and to the full extent permitted by law excludes all statutory warranties) in
relation to the Software (including as to its performance or fitness for a particular purpose); and

will not be liable in any way for any loss or damage (including special, indirect or consequential) arising from or in
connection with the Software or its use or performance.
© Sage Software Australia Pty Ltd
9
Contents
Licence Agreement
3
History of changes
13
Changes made ................................................................................................................. 13
Chapter 1.
Introduction
15
Content of this book .......................................................................................................... 15
Software support .............................................................................................................. 15
Report basics .................................................................................................................... 15
Chapter 2.
Structure of the report file
23
The report file's structure .................................................................................................. 23
Developing good habits .................................................................................................... 23
Chapter 3.
Constants
27
Constants for Text functions ............................................................................................. 27
Constants for If…EndIf statements .................................................................................. 33
Member, Partner, Beneficiary, Director constants............................................................ 34
Stock constants ................................................................................................................ 37
Zero constant .................................................................................................................... 38
Chapter 4.
Variables
41
Uses for variables ............................................................................................................. 41
Chapter 5.
Functions
43
Using the “Function Parameters” window ........................................................................ 43
Call another report file ...................................................................................................... 44
Date functions ................................................................................................................... 44
Mathematical functions ..................................................................................................... 45
Add and Print functions .................................................................................................... 48
Text functions ................................................................................................................... 64
Functions affecting the report's appearance .................................................................... 67
Functions for If…EndIf statements ................................................................................... 72
Miscellaneous functions ................................................................................................... 74
Chapter 6.
Statements
83
If…EndIf statements ......................................................................................................... 83
GroupStart() … GroupEnd() statements .......................................................................... 84
While … EndWhile statements ......................................................................................... 85
Chapter 7.
Notes to the Financial Statements
87
Numbering of the Notes .................................................................................................... 87
Notes and the Flexible Report Writer ............................................................................... 88
© Sage Software Australia Pty Ltd
11
Contents
Flexible Report Writer 2016
Appendix
93
Operators .......................................................................................................................... 93
Glossary of Terms
95
Index
99
12
© Sage Software Australia Pty Ltd
History of changes
The Flexible Report Writer 2016 user manual has been updated since the initial version. The
following list details the changes that have been made.
Changes made
The following changes have been made:
Changes included in version: 13/06/2016

First release of 2016 program.
Changes included in version: 20/11/2015

Added description of the GetSubDescription function.
© Sage Software Australia Pty Ltd
13
Chapter 1.
Introduction
HandiLedger 2016 reports are created by combining a report file and a format file.

The report file gives HandiLedger 2016 instructions on the financial accounts to examine,
and the mathematical operations to perform on those accounts.

The format file contains the column layout.
You can mix and match report files with format files. You can use the same report file with any
number of format files to create reports with a unique appearance.
Note: Be careful not to confuse the term report file with the term report. When you print a trial
balance from HandiLedger 2016, you must generate (or run) a report. In order for HandiLedger
2016 to generate the report, it must combine a report file with a format file.
HandiLedger 2016 includes the following tools for you to edit and create your own report files
and format files.

Flexible Report Writer – provides a programming language that you use to write (and edit)
report files.

Format Editor – used to edit and create format files.

Preferred Reports – used to define the Standard Reports available from the HandiLedger
2016 Financials menu.
Content of this book
This book is a Language Reference for the Flexible Report Writer. As such, it provides
advanced and detailed information on the programming syntax used to create report files.
Note: The Flexible Report Writer is one of three reporting tools. For information on the other
two tools (the Format Editor, and Preferred Reports), see the HandiLedger 2016 User Manual.
Software support
Please note that Sage Software Australia is unable to provide software support on matters
related to the Flexible Report Writer due to the complexity of report files that you can write and
the ability of people to understand and use structured programming languages.
Report basics
Your general understanding of the following items affects your ability to write report files using
the Flexible Report Writer:

How HandiLedger 2016 generates reports

Format files and report files

How the Flexible Report Writer is operated
© Sage Software Australia Pty Ltd
15
Chapter 1. Introduction
Flexible Report Writer 2016
This section provides basic information on how the HandiLedger 2016 reports operate. For
additional information on HandiLedger 2016 reports, see the HandiLedger 2016 User Manual.
Generating reports
HandiLedger 2016 reports are created by combining a report file and a format file. Therefore,
whenever HandiLedger 2016 generates a report, it must know which files to use. The manner
in which you generate the report determines how you select the appropriate report file and
format file.
You can generate reports (and define format files and report files) from the:

Financials menu

Flexible Report Writer

Format Editor
Generating reports from the Financials menu
Reports available on the Financials menu have a predefined report file and a default format file
allocated to them.
Figure 1: The Financials menu
From the Preferred Reports area in HandiLedger 2016, you can set the report file and default
format file for all of the HandiLedger 2016 Standard Reports. You can also add new reports into
the Financials menu.
Note: To access the Preferred Reports area, from the Reports menu, click Preferred
Reports.
For detailed information on operating the Preferred Reports area, refer to HandiLedger 2016
User Manual.
Generating reports from the Flexible Report Writer
When you run a report from the Flexible Report Writer, you must select a report file and a format
file before the report will run.
Note: To open the Flexible Report Writer, from the Reports menu, click Flexible Report
Writer. The "Report writer" window will open.
16
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Report basics
Figure 2: The “Report writer” window

To select the report file from within the Flexible Report Writer; on the "Report writer"
window, from the File menu, click Open.

To select the format file from within the Flexible Report Writer; on the "Report writer"
window, from the Run menu, click Select Format.
Generating reports from the Format Editor
When you run a report from the Format Editor, you must select a report file and a format file
before the report will run.
Note: To open the Format Editor; from the Reports menu, click Format Editor. The "Format
editor" window will open.
Figure 3: The “Format editor” window

To select the report file from within the Format Editor; on the "Format editor" window, from
the Run menu, click Select Report.

To select the format file from within the Format Editor; on the "Format editor" window, from
the File menu, click Open.
© Sage Software Australia Pty Ltd
17
Chapter 1. Introduction
Flexible Report Writer 2016
Format files and report files
HandiLedger 2016 includes a large number of format files and report files. You can 'mix and
match' the format files with report files to create reports with a unique appearance. You can
also write your own format files using the Format Editor, and your own report files using the
Flexible Report Writer.
Note: Some format files cannot be used with all report files. For example, Trial Balance reports
must use specific format files (e.g. TB-C and TB-CP). If you generate a non-trial balance report
using one of the trial-balance format files, a meaningless report is likely to result.
Due to the impact that the format file has on HandiLedger 2016 reports, it is important that you
have a sound understanding of format files before you begin to edit and create report files using
the Flexible Report Writer. The following practical exercise will help you develop your
understanding.
Understanding format files – a practical exercise
To develop an understanding of the impact of the format file, we recommend that you complete
the following exercise.
Exercise
1. Select an entity.
2. Run the Detailed Balance Sheet report using the default format file:

From the Financials menu, select Detailed Balance Sheet.

On the "Report Options" window, click OK.

Examine the report and then click Close.
3. Run the Detailed Statement of Financial Position using the Percentage format file:

From the Financials menu, select Detailed Balance Sheet.

On the Report Format tab of the "Report Options" window, select Percentage, and
then click OK.

Examine the report and then click Close.
Tip: There are many more format files available to you. For a list of all available format files:
On the Report Format tab of the "Report Options" window, click User Select, and then click
Select. The "Select a Format" window will open, displaying all of the format files.
Conclusion
As you can see, for a given report there are a considerable number of variations possible. Each
variation is achieved using a different format file.
18
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Report basics
Tip: Review the various format files available in HandiLedger 2016. You may find that one of
the format files supplied by HandiLedger 2016 solves your reporting issue.
Operating the Flexible Report Writer
You manage all report files from the HandiLedger 2016 "Report writer" window. To open the
window:

From the Reports menu, click Flexible Report Writer.
Figure 4: The “Report writer” window
The Flexible Report Writer has the following menus:

File menu

Edit menu

Search menu

Run menu

Tables menu
Flexible Report Writer's File menu
The Flexible Report Writer File menu contains the following items:
New
Creates a new report file.
Open
Opens an existing report file.
Save
Saves changes made to the current report file.
Save As
Saves the current report file to a new name.
Use Save As to copy a report file.
© Sage Software Australia Pty Ltd
19
Chapter 1. Introduction
Flexible Report Writer 2016
Note: Report files supplied by Sage HandiSoft cannot be edited. Instead, you must copy
the report file to a new name using the Save As option. You can then edit the new report
file.
Open Text Report
Text reports allow you to copy a report file from one installation of HandiLedger 2016 to
another. Where a report file was previously saved as a text report, you can read that text
report into HandiLedger 2016 using the Open Text Report option.
To read in the text report, in the "Report writer" window, from the File menu, click Open
Text Report. On the "Select a Report" window, highlight the report file and then click Open.
Save Text Report
Text reports allow you to copy a report file from one installation of HandiLedger 2016 to
another.
To save a report file as a text report: In the "Report writer" window, from the File menu,
click Save As Text Report. In the "Save As" window, indicate where to save the report file,
then enter the name of the report file, and then click Save.
Print
Sends a copy of the report file to the printer.
Exit
Exits the "Report writer" window.
Flexible Report Writer's Edit menu
The Flexible Report Writer Edit menu contains the following items:
Undo
Reverses the most recent change to your report code.
Clear
Removes all of your report code.
Select All
Selects all of your report code.
Cut
Cuts the highlighted report code and places it on the clipboard. You can then Paste the
report code to another location in your report file.
Copy
Copies the highlighted report code and places the copy onto the Windows clipboard. You
can then Paste the report code into another location in your report file.
Paste
Pastes information from the Windows clipboard into your report file.
Flexible Report Writer's Search menu
The Flexible Report Writer Search menu contains the following items:
Find
Searches for the nominated text.
Replace
Replaces specified text with the text that you nominate.
20
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Report basics
Flexible Report Writer's Run menu
The Flexible Report Writer Run menu contains the following items:
Report
Generates the report.
To generate a report, you must specify both a report file and a format file. If you have not
specified a report file or format file, HandiLedger 2016 prompts you to select the required
file.
Text Report
Generates the report using a text report rather than a report you have saved in the Flexible
Report Writer.
After you select Text Report from the Run menu, you must open the required text report.
Select Format
Opens the “Select a format” window for you to select a format file to use when you generate
a report from the "Report writer" window.
Options
Opens the "Report Options" window, from which you specify how the report is to be
generated (e.g. periods the report is to include). The settings that you specify in the "Report
Options" window are lost each time you exit the "Report Writer" window.
Flexible Report Writer's Tables menu
The Flexible Report Writer Tables menu contains the following items:
Account Ranges
Opens the “Alias account names” window, which lists the HandiLedger 2016 account
ranges. You will use Account Ranges as you create report files using the Flexible Report
Writer. Account Ranges enable the display of financial information in your reports.
Note Information Accounts
Opens the “Note Information Accounts” window for the current client. The Note Information
Accounts contain non-financial information that you can display in the client's Notes to the
Financial Statements.
Font
Opens the "Fonts" window, which displays the font styles that your practice has defined.
© Sage Software Australia Pty Ltd
21
Chapter 2.
Structure of the report file
When you write a report file, it is important that you structure the report code correctly. A good
structure will make your report file easy to read and will help you detect errors.
The report file's structure
Each report file generally contains the following components:

Report header – causes HandiLedger 2016 to print the same basic information at the top of
each page. For example, the top of a trial balance generally prints the client's name, report
name, and column headings.

Report body – contains details of the account codes that HandiLedger 2016 must use to
create the report.

Report footer – causes HandiLedger 2016 to print the same basic information at the
bottom of each page.
Developing good habits
When you write a report file it is crucial that you make the report code as easy to understand as
possible. Remember that you or someone else in your practice may need to modify the report
file later. The person who modifies the report file may not be very familiar with it.
The following methods and techniques will make your report file easier to modify in the future:

Comments

GroupStart()…GroupEnd() statements

Indentation

Consider the format files that can be used
Comments
A comment is a notation made within the report code. HandiLedger 2016 ignores comments
when it runs the report file.
Add comments into your report files to identify the report file, the various sections of the report,
and the aim of that section of report code. Use comments to make the report code more
understandable.
Syntax
! [comment text]
Where:

[comment text] - Text information making up the comment
© Sage Software Australia Pty Ltd
23
Chapter 2. Structure of the report file
Flexible Report Writer 2016
Example
! Print the rental income accounts
PrintAccounts (#RevRent, Cr)
In the above example:

Line One contains a comment. HandiLedger 2016 ignores the comment and would
immediately move to Line Two.

Line Two prints all of the accounts in the #RevRental alias range.
GroupStart() … GroupEnd() statements
The GroupStart() … GroupEnd() statements have two uses:
1. Show the logical grouping of the report code. For example, if you were writing a Profit and
Loss report, you would place the report code for the revenue section within a GroupStart()
… GroupEnd() statement. You would do the same for the expenses section of the report
code.
2. Prevent report code from being executed where it does not result in the printing of a value.
For example, if you had a report that printed a heading "Income", and then printed each
income account, you would only want the "Income" heading to print if the client had income.
For detailed information on the GroupStart()…GroupEnd() statement, see Chapter 6,
"Statements".
Indentation
Indent the text of your report file to indicate the hierarchy of your report code. Compare the
following two samples of report code. Both samples of code achieve the same result, however
Sample 2 is far easier to read than Sample 1.
Example
As you will learn in Chapter 6, "Statements", report code contained within an If…EndIf
statement is only executed if the selected entity meets specific conditions.
Sample One
If (IsCompany) then
AddText ("This is a company.")
Else
AddText ("The entity is not a company.")
EndIf
Sample Two
If (IsCompany) then
AddText ("This is a company.")
Else
AddText ("The entity is not a company.")
EndIf
The above two samples of report code do exactly the same thing. The only difference between
the two samples is that Sample Two uses indentation. In Sample Two it is far easier to see
which lines of report code will be executed in different circumstances. (Line Two is executed
only if the entity is a company, and Line Four is executed only where the entity is not a
company).
You will learn about all of the report commands contained in the above report samples within
this manual. For those of you who want to understand the above report code now:

Line One checks to see if the selected entity is a company.
Where the entity is a company, the IsCompany condition has been met, and HandiLedger
2016 will go to Line Two.
24
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Developing good habits

Where the entity is not a company then the condition has not been met. HandiLedger 2016
will go directly to Line Three, skipping the report code that lies between the "If…" line and
the "Else" line.

Line Two prints the text "This is a company."
Line Two (and any other report code that lies between the "If…" line and the "Else" line) is
executed only if the "If…" condition in Line One has been met.

Line Three indicates the start of the report code that HandiLedger 2016 is to execute where
the condition in the "If…" line was not met.

Line Four prints the text "The entity is not a company."
Line Four (and any other report code that lies between the "Else" line and the "EndIf" line) is
executed only if the "If…" condition in Line One was failed.

Line Five indicates the end of the If…EndIf statement.
A word of caution
When you write your own report files, it is important that you remember that users may generate
a report by combining your report file with any number of format files. Consequently, you must
ensure that your report file works correctly with the various format files. Different format files
can produce reports with vast differences in appearance.
This is illustrated in the following scenario.
Scenario
Imagine that your client has earned $10 per month for the financial year. If you run the following
report code for the client, the results would differ depending on the format file used.
Results using the DCP format file (the report was printed for periods 1 to 3):
Description
$
Revenue calculated with AddAccounts
30.00
Revenue calculated with AddClosingBalance
30.00
Results using the P13_1-3 format file (the report was printed for periods 1 to 3):
Jul
Aug
Sept
Jul –
$
$
$
Sept
$
Revenue calculated with
AddAccounts function
10.00
10.00
10.00
30.00
Revenue calculated with
AddClosingBalance function
10.00
20.00
30.00
30.00
Notice that for each monthly column, the AddClosingBalance function includes transactions for
all prior months, while the AddAccounts function only considers transactions falling into the date
range for that column.
© Sage Software Australia Pty Ltd
25
Chapter 2. Structure of the report file
Flexible Report Writer 2016
Report code
Rev1 = AddAccounts (#RevAll, Cr)
Rev2 = AddClosingBalance (#RevAll, Cr)
PrintValue ("Revenue calculated with AddAccounts", Rev1, Cr)
PrintValue ("Revenue calculated with AddClosingBalance", Rev2, Cr)
The above report code does the following:
26

Line One adds the total value of the #RevAll account range using the AddAccounts
function. The value that HandiLedger 2016 calculates is then stored in the Rev1 variable.

Line Two adds the closing balance of the #RevAll alias account range using the
AddClosingBalance function. The value that HandiLedger 2016 calculates is then stored in
the Rev2 variable.

Line Three prints a description, "Revenue calculated with AddAccounts". It also prints the
value that is stored in the Rev1 variable.

Line Four prints a description, "Revenue calculated with AddClosingBalance". It also prints
the value that is stored in the Rev2 variable.
© Sage Software Australia Pty Ltd
Chapter 3.
Constants
A Constant is a named item that retains a consistent value throughout the execution of a
program, as opposed to a variable, which can have its value changed during execution.
HandiLedger 2016 has a number of constants, which you can use in various functions.
Constants for Text functions
A number of constants exist that enable you to retrieve non-financial information from
HandiLedger 2016. You will generally use the following constants in conjunction with the
AddText, AddTabText, and AddColumnText functions.
The following types of constants may be used in conjunction with Text functions:

Date constants_D2HLink_97681

Name constants_D2HLink_97682

Other non-financial constants_D2HLink_97683
Dates constants
To print a date in a HandiLedger 2016 report file, you will instruct HandiLedger 2016 which date
to print, and how the date is to be displayed.
If required, you can subtract a certain number of days from a specific date, and then have
HandiLedger 2016 print the resulting date in your report.
Display of dates
The Flexible Report Writer can print dates in two different formats:

DD/MM/YYYY
HandiLedger 2016 displays dates in this default manner. Simply inserting a date constant
into an AddText function will result in a dated printed in this format.
AddText(Today)
For example, if today were the 27th August 2016, the above report code would cause
27/08/2016 to display.

DD Month, YYYY
This is the full date format. To achieve this format you must use the function FullDate. (For
detailed information on the FullDate function, see Chapter 5, "Functions").
AddText(FullDate(Today))
For example, if today were the 27th August 2016, the above report code would cause 27
August, 2016 to display.
Subtracting days from a date
You can use the SubtractDays function to deduct a certain number of days from a date. (For
detailed information on the SubtractDays function, see Chapter 5, "Functions").
© Sage Software Australia Pty Ltd
27
Chapter 3. Constants
Flexible Report Writer 2016
Available date constants
You can use the following date constants when you create report files using HandiLedger
2016's Flexible Report Writer.
AsAtDate
Entity types - All
Determines the "As At" date by referring to the period range that the report is printed for.
For example, where a report was printed from Period 3 to Period 3, the AsAt date would be
30 September 2016.
Note: AsAt cannot be used in conjunction with the FullDate function.
AuditorsReportDate
Entity types - All
The date on which the Auditors Report was signed, obtained from the “Notes to the
Financial Statements” window.
CurrentYear
Entity types - All
Obtains the year value for the current financial year.
For example, if the selected accounting year were for 1 July 2015 to 30 June 2016, the
value obtained would be 2016.
Note: CurrentYear cannot be used in conjunction with the FullDate function.
DatePreviousDividend
Entity types - Companies
The date on which the previous year's dividend was paid, obtained from the “Notes to the
Financial Statements” window.
DirectorsReportDate
Entity types - Companies
The date on which the Directors Report was signed, obtained from the “Notes to the
Financial Statements” window.
DirectorsStatementDate
Entity types - Trusts; Funds; Companies
The date on which the Members Statement, Trustees Statement, or Directors Statement
was signed. The date is obtained from the “Notes to the Financial Statements” window.
EndOfYear
Entity types - All
Obtains the End Date for the accounting period from the Year details for the entity.
For example, if the selected accounting year were for 1 July 2016 to 30 June 2017, the
value obtained would be 30 June, 2016.
Note: EndOfYear cannot be used in conjunction with the FullDate function.
PreviousDirectorsReport
Entity types - Company
Date on which the previous directors report was signed, obtained from the Directors
Report Date field in the Previous Dividend section of the “Notes to the Financial
Statements” window.
28
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Constants for Text functions
PreviousYearEnd
Entity types - All
Obtains the year-end date for the prior financial year. (E.g. If the current year was 1 July
2016 to 30 June 2017, the value obtained would be 30 June, 2016).
Note: PreviousYearEnd cannot be used in conjunction with the FullDate function.
PriorYear
Entity types - All
Obtains the year value for the prior financial year.
For example, if the selected accounting year were 1 July 2015 to 30 June 2016, the value
obtained would be 2016.
Note: PriorYear cannot be used in conjunction with the FullDate function.
Today
Entity types - All
The current date, obtained from the computer's system date.
TrusteeStatementDate
Entity types - Trusts; Fund
The date when the trustee's report was signed, obtained from the “Notes to the Financial
Statements” window.
Name constants
You can use the following name constants when you create report files using HandiLedger
2016's Flexible Report Writer.
ClientName
Entity types - All
Obtains the entity's business name from the "Clients" window.
NameJoiner
Entity types - All
Obtains the Relationship Name from the "Entity Details" window (e.g. Trading as).
TradingName
Entity types - All
Obtains the entity's trading name from the "Entity Details" window.
AuditorsName
Entity types - All
The name of the current Auditor, obtained from the “Notes to the Financial Statements”
window.
AuditorsRepresentative
Entity types - All
Name of the person representing the Auditors firm. This information is obtained from the
Representative field in the “Notes to the Financial Statements” window.
EmployersName
Entity types - Funds
Employer's name, obtained from the “Notes to the Financial Statements” window.
© Sage Software Australia Pty Ltd
29
Chapter 3. Constants
Flexible Report Writer 2016
Trustee1
Entity types - Funds
Name of the first trustee, obtained from the “Notes to the Financial Statements” window.
Trustee2
Entity types - Funds
Name of the second trustee, obtained from the “Notes to the Financial Statements” window.
Member
Entity types - All
See Member, Partner, Beneficiary, Director constants on page 34.
TaxAgentName
Entity types - All
Lists the first Tax Agent Name registered by your practice with Sage Software Australia.
AgentName
Entity types - All
Your practice's business name, which is registered with Sage Software Australia.
FirmName
Entity types - All
Your practice's business name, which you have entered in the Cover Page information
area.
FirmPartner
Entity types - All
Partner's name, which you have entered in the Cover Page information area.
Other non-financial constants
You can use the following non-financial constants when you create report files using
HandiLedger 2016's Flexible Report Writer.
ABN
Entity types - All
Entity's ABN, obtained from the "Entity Details" window.
AccruedBenefitsCurrentYr
Entity types - Funds
Value of current year accrued benefits. Obtained from the “Notes to the Financial
Statements” window.
AccruedBenefitsLastYr
Entity types - Funds
Value of prior year benefits. Obtained from the “Notes to the Financial Statements” window.
ACN
Entity types - All
Entity's ACN, obtained from the "Entity Details" window.
30
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Constants for Text functions
AmountPreviousDividend
Entity types - Company
Total value of the previous year's dividend, obtained from the “Notes to the Financial
Statements” window.
AmountProposedDividend
Entity types - Company
Total value of the dividend proposed for the current year. This information is obtained from
the “Notes to the Financial Statements” window.
AuditorsAddress
Entity types - All
Address of the audit firm, obtained from the “Notes to the Financial Statements” window.
AuditorsDescription
Entity types - All
The auditor's description, obtained from the Description field in the “Notes to the Financial
Statements” window.
AuditorsReportPlace
Entity types - All
The location where the Auditors Report was signed. Obtained from the “Notes to the
Financial Statements” window.
CurrentEmployeeRate
Entity types - Funds
Current employee contribution rate. Obtained from the “Notes to the Financial Statements”
window.
CurrentEmployerContRate
Entity types - Funds
Current employer contribution rate. Obtained from the “Notes to the Financial Statements”
window.
DirectorsReportPlace
Entity types - Company
The location where the Directors Report was signed. Obtained from the “Notes to the
Financial Statements” window.
DirectorsStatementPlace
Entity types - Company; Trust
The location where the Directors Statement was signed. Obtained from the “Notes to the
Financial Statements” window.
LastEmployeeRate
Entity types - Funds
Prior year's employee contribution rate. Obtained from the “Notes to the Financial
Statements” window.
LastEmployerRate
Entity types - Funds
Prior year's employer contribution rate. Obtained from the “Notes to the Financial
Statements” window.
© Sage Software Australia Pty Ltd
31
Chapter 3. Constants
Flexible Report Writer 2016
NoEmployees
Entity types - Company
Number of employees that the entity had at the end of the year. Obtained from the “Notes
to the Financial Statements” window.
PaidUpCapital
Entity types - Company
The number of shares forming the paid up capital. Obtained from the “Notes to the
Financial Statements” window.
ParValue
Entity types - Company
The par value of the company's share capital. Obtained from the “Notes to the Financial
Statements” window.
PrincipalActivity
Entity types - Company; SoleTrader; Partnership; Trust
Description of the entity's principal business activities, obtained from the “Notes to the
Financial Statements” window.
PriorTaxRate
Entity types - Company
Prior year's tax rate, obtained from the “Notes to the Financial Statements” window.
SharePreviousDividend
Entity types - Company
Previous year's dividend (per share) from the “Notes to the Financial Statements” window.
ShareProposedDividend
Entity types - Company
Per-share value of the proposed dividend for the current year. The information is obtained
from the “Notes to the Financial Statements” window.
TaxRate
Entity types - Company; Fund
Current year's tax rate, obtained from the “Notes to the Financial Statements” window.
TrusteeStatementPlace
Entity types - Fund
Location where the trustee's report was signed. Obtained from the “Notes to the Financial
Statements” window.
YearPreviousDividend
Entity types - Company
Financial year in which the previous dividend was paid. Obtained from the “Notes to the
Financial Statements” window.
FirmAddress1
Entity types - All
The first line of your practice's address, which you have entered in the Cover Page
information area.
32
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Constants for If…EndIf statements
FirmAddress2
Entity types - All
The second line of your practice's address, which you have entered in the Cover Page
information area.
FirmPostcode
Entity types - All
Your practice's postcode, which you have entered in the Cover Page information area.
Constants for If…EndIf statements
You are able to use a number of entity details constants in conjunction with If…EndIf
statements. There are also a number of other miscellaneous constants that you can use within
If…EndIf statements. If…EndIf statements allow you to restrict certain sections of your code to
entities with specific characteristics (for example, to companies).
Note: For detailed information on If…EndIf statements, see "If…EndIf statements" in Chapter
6, "Statements".
Entity details constants
The following constants obtain information from the "Entity Details" window.
IsCompany
Is the Entity Type a Company?
IsPartnership
Is the Entity Type a Partnership?
IsSoleTrader
Is the Entity Type a Sole Trader?
IsSuperFund
Is the Entity Type a Superannuation Fund?
IsTrust
Is the Entity Type a Trust?
IsAssociation
Is the Company Sub-Type set to Association?
IsDefinedBenefit
Is the Super Fund Sub-Type set to Defined Benefit?
IsDefinedContribution
Is the Super Fund Sub-Type set to Defined Contribution?
IsTrustee
Is the Company Sub-Type set to Trustee?
IsReportingEntity
Is the Reporting Entity check box selected?
IsSmallProprietary
Is the Small Prop Company check box selected?
IsDormantCompany
Is the Dormant Company check box selected?
© Sage Software Australia Pty Ltd
33
Chapter 3. Constants
Flexible Report Writer 2016
HasPrimaryProduction
Under Include Accounts, is the Primary production check box selected?
HasLivestock
Under Include Accounts, is the Livestock check box selected?
HasManufacturing
Under Include Accounts, is the Manufacturing check box selected?
HasTrading
Under Include Accounts, is the Trading check box selected?
HasNotes
Under Options, is the Notes to accounts check box selected?
Other If…EndIf constants
You can use the following miscellaneous constants in conjunction with If…EndIf statements
when you create report files using HandiLedger 2016's Flexible Report Writer.
IsAudited
Looks at the Auditor Details section in the “Notes to the Financial Statements” window. If
the section contains data, it is assumed that the entity is being audited and the IsAudited
constant is set to YES.
MaxSubAccount
For information on this constant, see "MaxSubAccount" on page 36.
Zero
For information on this constant, see "Zero constant" on page 38.
Member, Partner, Beneficiary, Director constants
The Member and MaxSubAccount constants are available to extract information on the entity's
members, partners, beneficiaries, and directors.
Member
Use the Member constant to print the names of your client's members, partners, or
beneficiaries. There are two ways that you can use this constant:

Method 1

Method 2
Method 1
Print the name of a member listed in a specific position under Members, Partners,
Beneficiaries, Directors, which is available from the View menu.
Syntax
"MemberN"
34

Member - The text Member.

N - The number of the member, partner, beneficiary, or director to be printed. To see the
MemberNumbers allocated to each member, partner, beneficiary, or director: From the
View menu, click Members, Partners, Beneficiaries, Directors.
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Member, Partner, Beneficiary, Director constants
Note
You must enclose MemberN in quotation marks.
Example
AddText ("Member1 is the first member listed")
If the first member listed is John Doe, the above report code would print:
John Doe is the first member listed.
Method 2
You can use the syntax from this method to list all members, partners, beneficiaries, or
directors. To do this, you must combine the Member constant with a While…EndWhile
statement (see the following example).
Note: For detailed information on While…EndWhile statements, see "While…EndWhile
statements" in Chapter 6, "Statements".
Syntax
"Member" + N

Member - The text (including quotation marks) "Member".

N - The number of the member, partner, beneficiary, or director to be printed. To see the
MemberNumbers allocated to each member, partner, beneficiary, or director: From the
View menu, click Members, Partners, Beneficiaries, Directors.
Example
x = 1
While x <= TotalBeneficiaries()
AddText ("Member" + x)
x = x + 1
EndWhile
The above report code does the following:

Line One stores the value of 1 in the variable "x".
Note: HandiLedger 2016 treats the first member, partner, beneficiary, or director listed as
Member1. This is why the variable x is initially set to equal 1.

Line Two compares the value of variable "x" to the total number of beneficiaries (which
HandiLedger 2016 ascertains using the TotalBeneficiaries constant).
Where the value of "x" is less than or equal to the total number of beneficiaries, then the text
contained within the While…EndWhile statement will be executed. HandiLedger 2016 will
go to Line Three.
Where the value of "x" is greater than the total number of beneficiaries, the While condition
has been failed. None of the report code contained within the While…EndWhile statement
is executed. Instead, HandiLedger 2016 goes directly to Line Five, skipping Line Three and
Line Four.
Note: You can also use the TotalPartners, TotalDirectors, or TotalMembers functions
instead of TotalBeneficiaries.

Line Three prints the name of a beneficiary. HandiLedger 2016 will print the name of the
beneficiary which corresponds to Member x. As the value of "x" changes each time the
While…EndWhile statement is executed, a new member's name will print each time the
While….EndWhile statement is looped. HandiLedger 2016 will go to Line Four.
© Sage Software Australia Pty Ltd
35
Chapter 3. Constants
Flexible Report Writer 2016

Line Four increases the value of variable "x" by 1. Once Line Four has been executed,
HandiLedger 2016 returns to Line Two.

Line Five indicates the end of the While…EndWhile statement. HandiLedger 2016
executes this line only once the condition in the "While…” line has been failed (i.e. once "x"
exceeds the total number of beneficiaries).
MaxSubAccount
Use the MaxSubAccount constant to have HandiLedger 2016 determine the largest subaccount number.
If you use the MaxSubAccount constant with a Partnership, Trust, or Superannuation Fund, you
can determine the number of partners/beneficiaries/members that the entity has. This is
because each HandiLedger 2016 assigns each partner, beneficiary, and member a sub-account
number.
For example, if your client were a Partnership of two partners, the report code AddText
(MaxSubAccount) would display a value of two.
Syntax
MaxSubAccount
Note

The first member/partner/beneficiary will always have a sub-account number of one.

HandiLedger 2016 does not set up sub-accounts for Company directors. Therefore, the
MaxSubAccount constant cannot determine a company's total number of directors.

You will most commonly use the MaxSubAccount constant in conjunction with While …
EndWhile statements, allowing specific lines of the report code to repeat for each
member/partner/beneficiary.
Example 1
AddText (MaxSubAccount)
If you ran the above report code for a Partnership with two partners, a value 2 would be
displayed in the report.
Example 2
x=1
While x<= MaxSubAccount
AddText (GetMemberName(x))
x=x+1
EndWhile
When you run the above report code:
36

Line One sets variable x to equal 1.

Line Two compares x to the maximum sub-account number. Where x is less than or equal
to the maximum sub-account, then line three and line four will run. Otherwise, line five will
run.

Line Three causes HandiLedger 2016 to print the name of the member, partner,
beneficiary, or director.

Line Four increases the variable x by a value of one.
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Stock constants
Stock constants
You can extract livestock information using the Stock constant.
Stock
Use the Stock constant to print the type of livestock held by the entity. (Note: To define the
livestock types, from the View menu, click Livestock).
Syntax
"Stock"+StockNumber

"Stock" - The text "Stock" (including the quotation marks).

StockNumber - either a variable, or a number typed into your report code. The
StockNumber tells HandiLedger 2016, which item of livestock to display.
For clarification of the StockNumber concept, refer to the following Note, and to Example 1.
Note
To see the various livestock types that exist for a specific entity: From the View menu, click
Livestock.
The first livestock type commences at Stock Number zero. For example, in the above
illustration, the "Bees" stock item would have a StockNumber of zero, and the "Pigeons" stock
item would have a StockNumber of one.
The maximum number of livestock types that an entity can have is 10. Therefore, the last
livestock type will be assigned to Stock Number nine.
Example One
Imagine that the livestock items shown above have been set up for your entity:
AddText ("Stock"0)
AddText ("Stock"1)
If the above report code was executed, then the following would print:
Bees
Pigeons
Notice that the third item of livestock, "Turkeys", has not printed. This is because the above
report code stops at livestock item two.
The solution is to use a loop. This is illustrated in Example Two.
© Sage Software Australia Pty Ltd
37
Chapter 3. Constants
Flexible Report Writer 2016
Example Two
x = 0
While x <= 9
AddText ("Stock" + x)
x = x +1
EndWhile
The above report code would result in the following being printed:
Bees
Pigeons
Turkeys
The report effectively does the following:

Line One sets the variable "x" to equal the number zero.

Line Two instructs HandiLedger 2016 to perform the code that is enclosed in the
While…EndWhile statement, provided that the variable "x" is less than or equal to the
number nine.
If "x" is greater than 9, HandiLedger 2016 will go directly to Line Five.

Line Three is executed only if Line Two's While condition was met (i.e. "x" was less than or
equal to 9). If Line Three is executed, then it will print a description for the stock item that
corresponds to StockNumber "x". ("x" represents a number, which changes each time the
While…EndWhile statement is looped).

Line Four is executed only if Line Two's While condition was met (i.e. "x" was less than or
equal to 9).
When HandiLedger 2016 executes Line Four, it increases the value of "x" by one.
HandiLedger 2016 then moves directly to Line Two.

Line Five indicates the end of the While…EndWhile statement. HandiLedger 2016 will
execute Line Five only once it has failed the While condition in Line Two.
The above example loops through the AddText ("Stock" + x) function until the variable x
reaches a value of 10. The variable x initially starts with a value of zero.
Zero constant
The constant Zero holds a value of 0 (zero). This constant is used to set variables to hold a
value of zero.
Syntax
Zero
Example
TotalIncome = Zero
The above example sets the TotalIncome variable to a value of zero.
Important!
You cannot perform a function on a variable unless the variable contains a value. If you try to
perform a function on a variable that contains no value, you will receive an error message.
For example, if you ran the following report code for a Partnership, you would receive an
"Incorrect Assignment" error. The error occurs because the CoRev = AddAccounts (#RevAll)
line does not execute for a non-company entity type. Consequently, when HandiLedger 2016
executes the PrintValue line, an error occurs because CoRev does not contain a value.
38
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Zero constant
If(IsCompany) then
CoRev = AddAccounts (#RevAll)
EndIf
PrintValue ("The CoRev variable", CoRev, Cr)
You will avoid the above problem if you initialise all variables before their use (e.g. CoRev =
Zero initialises the CoRev variable). The insertion of that line ensures that the CoRev variable
contains a value, even where the "If" statement is not executed. The amended report code
would appear as:
CoRev = Zero
If(IsCompany) then
CoRev = AddAccounts (#RevAll)
EndIf
PrintValue ("The CoRev variable", CoRev, Cr)
There is another solution to the above problem. If the PrintValue ("The CoRev variable",
CoRev, Cr) line was moved between the CoRev and EndIf lines, then the PrintValue line would
only execute where the CoRev variable contained a value. This solution would only work where
the variable was used exclusively within one "If" statement or "Group".
© Sage Software Australia Pty Ltd
39
Chapter 4.
Variables
A variable is a named storage location capable of containing data that HandiLedger 2016 can
modify during the execution of a report file.
Variables enable you to store various values and text information for future retrieval and use
within a report file. You can use variables to perform mathematical operations on different
values, such as subtracting one value from another. You will use variables when you calculate
and then print a total value in a report.
Uses for variables
The following items provide examples of how you might want to use variables within your
reports.
Calculating a total
To calculate a total, you must accumulate values in a variable.
Income = PrintAccounts (#RevAll, Cr)
PrintValue ("Total income", Income, Cr, BothLines)
The above example uses a variable, "Income". The report code does the following:

Line one prints each income account (using the PrintAccounts function), and accumulates
the value of each income account in the variable, "Income".

Line two prints a total value for the income account (using the PrintValue function).
Deducting one total from another
Sometimes you will need to deduct the value of one variable from another. For example, to
calculate Net Profit you need to deduct total expenses from total income.
Income = PrintAccounts (#RevAll, Cr)
PrintValue ("Total income", Income, Cr, BothLines)
Expense = PrintAccounts (#ExpAll, Cr)
PrintValue ("Total expenses", Expense, Dr, BothLines)
Profit = Income - Expense
PrintTotalValue ("Net Profit(Loss)", Profit, Cr, DoubleUnderLine)
In the above example:

Line one prints each income account (using the PrintAccounts function), and accumulates
the value of each income account in the variable, "Income".

Line two prints a total value for the income account (using the PrintValue function).

Line three prints each expense account (using the PrintAccounts function), and
accumulates the value of each expense account in the variable, "Expense".

Line four prints a total value for the expense account (using the PrintValue function).

Line five calculates the profit or loss by deducting the "Expense" variable from the "Income"
variable, and storing the resulting value in the variable "Profit".

Line six prints a total value for the profit or loss (using the PrintTotalValue function).
© Sage Software Australia Pty Ltd
41
Chapter 4. Variables
Flexible Report Writer 2016
Variables within a While…EndWhile statement
A While…EndWhile statement instructs HandiLedger 2016 to repeat a number of lines of report
code while a specific condition exists. Calculation of the condition will occur in the code
encased by the While…EndWhile. Calculation of the condition generally involves incrementing
a variable by a specific amount.
x=1
While x<= MaxSubAccount
AddText (GetMemberName(x))
x=x+1
EndWhile
The above example lists all of the member, partner, beneficiary, or director names for the
selected entity. The purpose of each line is:

Line one sets the variable x equal to 1.

Line two compares the value of x to the maximum sub-account number. The maximum
sub-account number indicates the total number of members, partners, beneficiaries, or
directors. If x is less than or equal to the maximum sub-account number, then the code
within the While…EndWhile statement will be executed.

Line three prints the member's, partner's, beneficiary's, or director's name.

Line four increases the value of x by one.
Storing text
In addition to storing numeric values, variables can store text. This is illustrated below:
Text1 = "The entity is a "
If IsCompany then
Text2 = "Company."
ElseIf IsTrust then
Text2 = "Trust."
ElseIf IsSoleTrader then
Text2 = "Sole Trader."
ElseIf IsPartnership then
Text2 = "Partnership."
Else
Text2 = "Superannuation Fund."
EndIf
AddText (Text1+Text2)
The above example determines the entity type, and then prints a message stating the entity
type using two variables:

The variable Text1 contains the first part of the message, "The entity is a ". The first section
of the message does not change.

The variable Text2 contains this last part of the message. The text held within Text2 is
determined by a series of If statements, which determine the entity type.
The last line of the report code prints the message. It does this by adding the two variables
together within the AddText function.
42
© Sage Software Australia Pty Ltd
Chapter 5.
Functions
A function is a routine that will be completed by the Flexible Report Writer (for example, the
addition of a number of values). In the Flexible Report Writer, you can use functions to
calculate values, print information etc.
Using the “Function Parameters” window
Instead of typing in a function command, you can right click on the line in the “Report writer”
window and select the required function.
Figure 5: Report Writer function selector
The “Function Parameters” window will open for you to enter and select the parameters for the
function.
Figure 6: The "Function Parameters" window
Clicking OK creates the command line with the correct syntax.
© Sage Software Australia Pty Ltd
43
Chapter 5. Functions
Flexible Report Writer 2016
Call another report file
You can run another report file from within the existing report file. You can run either a Sage
HandiSoft report file (RunHSReport), or a user report file (RunMyReport).
For an example of the RunHSReport function in use, refer to the Sage HandiSoft report file
"NotesNonRepSingle".
RunHSReport
Runs a Sage HandiSoft report file from within another report file.
Syntax
RunHSReport ("ReportName", "FormatName")
Where:

ReportName - Name of the Sage HandiSoft report file to run. The report file's name must
be enclosed in quotation marks.

FormatName - Name of the format file to apply to the report file. The format file's name must
be enclosed in quotation marks.
Example
RunHSReport ("Note1_NonRep", "DCP")
The above report code would open the report file Note1_NonRep and format file DCP, and use
those two files to generate a new report. Once HandiLedger 2016 has generated the new
report, it will return to the original report file (the one containing the RunHSReport command)
and execute the remaining lines of report code.
RunMyReport
Runs a User Report file (i.e. a report file created by your firm) from within another report file.
Syntax
RunMyReport ("ReportName", "FormatName")
Where:

ReportName - Name of report file to run. This report file must have been created by your
practice. The report file's name must be enclosed in quotation marks.

FormatName - Name of the format file to apply to the report file. The format file's name
must be enclosed in quotation marks.
Example
RunMyReport ("My_report", "My_DCP")
The above report code would open the a report file that your practice had created (My_report)
and format file that your practice had created (My_DCP), and use those two files to generate a
new report. Once HandiLedger 2016 has generated the new report, it will return to the original
report file (the one containing the RunMyReport command) and execute the remaining lines of
report code.
Date functions
HandiLedger 2016 includes a number of date constants, which you can use to insert dates in a
report. You can control the formatting of those dates using the FullDate and SubtractDays date
functions, which are detailed below.
44
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Mathematical functions
Note: For information on the date constants, see Chapter 3, "Constants".
FullDate
Displays a date in the format DD Month, YYYY instead of the format DD/MM/YYYY.
Syntax
AddText (FullDate(DateConstant))
Where:

DateConstant - A date constant, which tells HandiLedger 2016 which date to insert. For
information on the date constants, see Chapter 3, "Constants".
Example
AddText (FullDate(Today))
The above example would print today's date in a format similar to: (27 August, 2016).
SubtractDays
SubtractDays will deduct a specified number of days from a specified date.
Syntax
SubtractDays (date, number)
Where:

Date - Date from which the days will be subtracted. You can either use one of the date
constants (for information on date constants, see Chapter 3, "Constants"), or you can
manually enter the date using the format "DD/MM/YYYY". When you manually enter a
date, the date must be enclosed in quotation (" ") marks.

Number - Number of days to deduct from the date.
Example
AddText (SubtractDays(Today, 60))
AddText (FullDate(SubtractDays ("01/12/2016",1)))
In the above example, the first line of report code would cause HandiLedger 2016 to print the
value of the current date, minus 60 days. The second line of report code would print 30
November, 2016.
Mathematical functions
The Flexible Report Writer allows you to perform a number of mathematical operations using
the following mathematical functions:

Accumulate

AverageCost

Multiplication

Division

Ratio
© Sage Software Australia Pty Ltd
45
Chapter 5. Functions
Flexible Report Writer 2016
Accumulate
Variables in HandiLedger 2016 do not store a single value. Instead, they store twelve values –
a value for each period in the year. This provides for the printing of interim reports, and the
printing of reports that display a different period range in each column.
The Accumulate function in HandiLedger 2016 calculates a running balance.
Syntax
Accumulate (Variable)
Where:

Variable - Name of the variable to be accumulated
Example
TotalInc = AddAccounts (#RevAll, Cr)
PrintValue ("Total Income", TotalInc, Cr)
TotalExp = AddAccounts (#ExpAll, Dr)
PrintValue ("Total Expense", TotalExp, Cr)
Profit = TotalInc - TotalExp
PrintTotalValue ("Net Profit", Profit, Cr, BothLines)
CumulativeProfit = Accumulate (Profit)
PrintTotalValue ("Cumulative Net Profit", CumulativeProfit, Cr, DoubleUnderLine)
If you printed the above report code using a format file that displays each month in a separate
column, the result would be similar to the following illustration. Notice that the Cumulative Net
Profit includes the profit from all prior months.
July
Aug
Sept
2016
2016
2016
Total Income
Total Expense
Net Profit
Cumulative Net Profit
2108.25
469.39
1638.86
1638.86
2690.99
1286.50
1404.49
3043.35
1650.39
1489.41
160.98
3204.33
AverageCost
Calculates the average cost of livestock.
Syntax
AverageCost (Variable1, Variable2, Variable3)
Where:

Variable1 - Livestock number. Note: the first livestock category listed from View / Livestock
is considered to be Livestock Number 1.

Variable2 - A variable that was calculated before the AverageCost function within the report
code.

Variable3 - A variable that was calculated before the AverageCost function within the report
code.
Note
When running a report file that contains the AverageCost function, you must use a format file
containing a quantity column (e.g. Format DQC or DQCP).
Example
Average cost is calculated using the value of (a) opening stock, (b) purchases and, (c) natural
increase.
46
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Mathematical functions
!Set starting value of all variables
Count = 0
OpStk = AliasStart (#ExpLiveOpStock)
Purch = AliasStart (#ExpLivePurch)
NatInc = AliasStart (#ExpLiveNatInc)
TotalProfit = Zero
While (Count < 10)
GroupStart ()
x = AddOpeningStock (OpStk, OpStk, DR)
x = x + AddAccounts (Purch, Purch, DR)
y = AddAccounts (NatInc, NatInc, DR)
x = x + y
Average = AverageCost (Count, x, y)
PrintValue ("Average cost", Average, CR, NoLine)
! Increment variables by one
Count = Count + 1
OpStk = OpStk + 1
Purch = Purch + 1
NatInc = NatInc + 1
GroupEnd()
EndWhile
Notice that a section of the above report code is looped using the While … EndWhile statement.
This looping is necessary, as a number of livestock groups can exist. In order to calculate the
average cost for each group of livestock, the report code must be executed a number of times.
The number of times that the While…EndWhile statement is executed is determined by the
Count variable. Initially Count is set to equal zero. The value of count is then increased by one
each time the While….EndWhile statement is completed.
Also, notice that the AddOpeningStock and AddAccounts functions are not using AliasStart and
AliasEnd commands. Instead, they have been replaced with the OpStk, Purch and NatInc
variables. It is necessary to use these variables to determine the account codes, because the
account codes must change for each livestock group.
Multiplication
Multiplies a variable by a specified value.
Syntax
Multiplication (Variable, Amount)
Where:

Variable - Name of the variable to be multiplied.

Amount - Value by which to multiply the variable.
Example
TotalRev = AddAccounts (#RevAll)
TotalRevDoubled = Multiplication (TotalRev, 2)
In the above example, HandiLedger 2016 multiplies the variable "TotalRev" by two. It then
stores the resulting value in the "TotalRevDoubled" variable.
Note: The above report code does not print a value for TotalRevDoubled. Instead, it has
simply saved a value into the TotalRevDoubled variable. If you wanted to also print a value for
TotalRevDoubled, you would type the following into the third line of your report code:
© Sage Software Australia Pty Ltd
47
Chapter 5. Functions
Flexible Report Writer 2016
PrintValue ("Total Revenue Doubled", TotalRevDoubled, Cr)
Division
Divides a variable by a specified value.
Syntax
Division (Variable, Amount)
Where:

Variable - Name of the variable to be divided.

Amount - Value by which to divide the variable.
Example
TotalIncomeHalved = Division (TotalIncome, 2)
The above example divides the variable TotalIncome by two, and then stores the calculated
amount in the TotalIncomeHalved variable.
Ratio
Calculates a ratio by dividing one variable by another variable.
Syntax
Ratio (Variable1, Variable2)
Where:

Variable1 - Name of the variable to be divided.

Variable2 - Name of the variable by which Variable1 will be divided
Note
To see this function in use, refer to the Sage HandiSoft report file "Ratios".
Example
WorkingCapital = Ratio (CAssets, CLiabilities)
The above example divides the variable CAssets by the variable Liabilities, and then stores the
calculated value in the variable Working Capital.
Add and Print functions
Add functions allow you to add together values obtained from various account ranges.
Generally, you would then store the total value in a variable for future use.
Print functions will print the values obtained from a specified account range. HandiLedger 2016
prints a value for each individual account within the nominated account range.
Caution: You must take care when selecting the required function. In some instances, two
different functions can appear to do the same thing, however you may notice a difference
between the functions if you apply a different format file to the report file. Remember: While
different functions may produce the same total value for the year, the value that they report
each period may vary. Please read the following example carefully.
48
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Add and Print functions
Example
Imagine that your client has earned $10 per month for the financial year. If you run the following
report code for the client, the results would depend on the format file used.
Results using the DCP format file (the report was printed for periods 1 to 3):
Description
$
Revenue calculated with AddAccounts
30.00
Revenue calculated with AddClosingBalance
30.00
Results using the P13_1-3 format file (the report was printed for periods 1 to 3):
Jul
Aug
Sept
$
$
$
Jul Sept
$
Revenue calculated with AddAccounts
function
10.00
10.00
10.00
30.00
Revenue calculated with AddClosingBalance
function
10.00
20.00
30.00
30.00
Notice that for each monthly column, the AddClosingBalance function includes transactions for
all prior months, while the AddAccounts function only considers transactions falling into the date
range for that column.
Report code
Rev1 = AddAccounts (#RevAll, Cr)
Rev2 = AddClosingBalance (#RevAll, Cr)
PrintValue ("Revenue calculated with AddAccounts", Rev1, Cr)
PrintValue ("Revenue calculated with AddClosingBalance", Rev2, Cr)
The above report code does the following:

Line One adds the total value of the #RevAll account range using the AddAccounts
function. The value that HandiLedger 2016 calculates is then stored in the Rev1 variable.

Line Two adds the closing balance of the #RevAll alias account range using the
AddClosingBalance function. The value that HandiLedger 2016 calculates is then stored in
the Rev2 variable.

Line Three prints a description, "Revenue calculated with AddAccounts". It also prints the
value that is stored in the Rev1 variable.

Line Four prints a description, "Revenue calculated with AddClosingBalance". It also prints
the value that is stored in the Rev2 variable.
Add functions
Add functions allow you to add together values obtained from various account ranges.
Generally, you would then store the total value in a variable for future use.
The Flexible Report Writer provides the following Add functions:

AddAccounts

AddCashAccounts

AddClosingBalance

AddClosingStock

AddMember

AddMovement
© Sage Software Australia Pty Ltd
49
Chapter 5. Functions

AddOpeningBalance

AddOpeningStock

AddSubAccounts
Flexible Report Writer 2016
AddAccounts
Adds together the values obtained from the specified account range (or alias).
Syntax
AddAccounts (#Alias, AccountType)
Where:

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.
Example
Revenue = AddAccounts (#RevAll, CR)
PrintValue ("Total revenue", Revenue, Cr)
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
Total revenue
15.00
15.00
15.00
45.00
AddCashAccounts
The AddCashAccounts function instructs HandiLedger 2016 to add together all of the cash
transactions for the specified account range (or alias).
Transactions entered in HandiLedger 2016 through Cash Receipts, Cash Payments, and
Bank Statements are marked as Cash Transactions. When you enter transactions through
Journal Entries, you must select the Cash Transaction check box if the transaction is a Cash
Transaction.
To see this function in use, refer to the Sage HandiSoft report file "CashFlowStatement".
Syntax
AddCashAccounts (#Alias, AccountType)
Where:

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.
Example
Revenue = AddCashAccounts (#RevAll, CR)
PrintValue ("Total cash revenue", Revenue, Cr)
Imagine that each month your client earns $10 cash sales and $5 credit sales. Total revenue
each month is $15.
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
50
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Total cash revenue
Add and Print functions
Jul
$
Aug
$
Sept
$
10.00
10.00
10.00
Jul Sept
$
30.00
AddClosingBalance
The AddClosingBalance function causes HandiLedger 2016 to add together all closing balances
for the specified account range (or alias). Refer to the following example for a complete
explanation.
Syntax
AddClosingBalance (#Alias, AccountType)
Where:

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.
Example
Revenue = AddClosingBalance (#RevAll, CR)
PrintValue ("Total closing revenue", Revenue, Cr)
Imagine that each month your client earns $10 cash sales and $5 credit sales. Total revenue
each month is $15.
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
Total closing revenue
15.00
30.00
45.00
45.00
AddClosingStock
The AddClosingStock function causes HandiLedger 2016 to add together all closing balances
for the specified account range (or alias). Refer to the following example for a complete
explanation.
Syntax
AddClosingStock (#Alias, AccountType)
Where:

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.
Example
RawMat = AddClosingStock (#CaTradRaw, Dr)
PrintValue ("Closing raw materials", RawMat, Dr)
Imagine that the closing value of raw materials was July = $5, Aug= $33, and Sept=$20.
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
© Sage Software Australia Pty Ltd
51
Chapter 5. Functions
Closing raw materials
Flexible Report Writer 2016
Jul
$
Aug
$
Sept
$
5.00
33.00
20.00
Jul Sept
$
20.00
AddMember
Extracts details of the amount distributed to a specific member, partner, or beneficiary.
Note: You must use the Distribute function before the AddMember function. This is because
HandiLedger 2016 physically distributes the profit for an entity when you rollover the client into
the next accounting year. Generally the report you are preparing is prepared before the
account year has been closed and rolled-over. The Distribute function mimics the distribution
that HandiLedger 2016 will perform when it closes the year and rolls forward.
Syntax
AddMember (Number, AccountType)
Where:

Number - Sub-account number.

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.
Example
Distribute (Profit)
x=1
While x<= TotalMembers()
Allocation = AddMember (x, Cr)
PrintValue ("Allocation: " + GetMemberName(x), Allocation, Cr)
x=x+1
EndWhile
The above report code does the following:

Line One of the above report code would distribute the value of the variable "Profit"
between the partners, members or beneficiaries according to the information entered in
Members, Partners, Beneficiaries, Directors.
Note: The value of the variable "Profit" would have been calculated earlier in the report.

Line Two sets variable x to equal one.

Line Three compares the value in x to the total number of members. Where x is less than
or equal to the total number of members, lines 4 to 6 will be executed.

Line Four extracts the profit distributed to MemberX (eg Member1), and stores the value in
variable, Allocation.

Line Five prints the value of the distribution received by this member.

Line Six increments the value of x by one.
Note: HandiLedger 2016 repeats Line Four to Line Six of the report code until x exceeds the
total number of members.
Imagine that your client has a profit of $180, and that you will distribute 50% of the profits to
each member. If you ran the above report code in that situation, the result would be:
52
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Add and Print functions
2016
$
Member One
Member Two
90.00
90.00
Note: If the above report code had not included the Distribute function at line 1, no values
would have been distributed to the members. Consequently, a value of zero would print for
each member.
AddMovement
Calculates the difference between the opening and closing balances for each account in the
nominated account range (or alias), and then adds all of the differences together.
Syntax
AddMovement (#Alias, AccountType)
Where:

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.
Example
Revenue = AddMovement (#RevAll, CR)
PrintValue ("Revenue movement", Revenue, Cr)
Imagine that your client had sales of July=$15, August=$25, September=$55
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
Revenue movement
15.00
25.00
55.00
95.00
In each column, HandiLedger 2016 calculates the movement as the closing balance less the
reporting period's opening balance (not the month's opening balance).
AddOpeningBalance
Obtains the opening balance for each account in the nominated account range for the
nominated period, and then adds all the opening balances together.
Syntax
AddOpeningBalance (#Alias, AccountType)

Where:

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.
© Sage Software Australia Pty Ltd
53
Chapter 5. Functions
Flexible Report Writer 2016
Example
Revenue = AddOpeningBalance (#RevAll, CR)
PrintValue ("Opening revenue", Revenue, Cr)
Imagine that each month your client earns $11 cash sales and $5 credit sales. Total revenue
each month is $15.
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
Opening revenue
0.00
15.00
30.00
0.00
AddOpeningStock
Obtains the opening stock balance for each account in the nominated account range for the
nominated period, and then adds all the opening balances together.
Syntax
AddOpeningStock (#Alias, AccountType)
Where:

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.
Example
RawMat = AddOpeningStock (#ExpTradOpRaw, Dr)
PrintValue ("Opening raw materials", RawMat, Dr)
Imagine that the closing value of raw materials was July = $5, Aug = $33, and Sept = $20.
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
Opening raw materials
0.00
5.00
33.00
0.00
AddSubAccounts
Adds together the values obtained from the specified account range (or alias).
Unless you use the SetSubAccount function to define the sub-accounts to add, all sub-accounts
in the specified account range will be added. For information on the SetSubAccount function,
see "SetSubAccount" on page 76.
Syntax
AddSubAccounts (#Alias, AccountType)
Where:
54

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Add and Print functions
Example
Imagine that your client has sub-accounted their Sales account and that sales of Orange Juice
are recorded in account 0510.01, and sales of Flavoured Milk in account 0510.02.
During the first three months of the year, sales were:
Orange Juice
July=$100
Aug=$325
Sept=$130
Flavoured Milk
July=$35
Aug=$240
Sept=$180
x=1
While x<=2
SetSubAccount (x)
Rev = AddSubAccounts (#RevAll, CR)
PrintValue ("Sales - sub account "+x, Rev, Cr)
x=x+1
EndWhile
SetSubAccount(0)
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
Sales - sub account 1
Sales - sub account 2
100.00
35.00
325.00
240.00
130.00
180.00
555.00
455.00
Print functions
Print functions allow you to display values, which HandiLedger 2016 has obtained from various
account ranges, in your report.
The Flexible Report Writer provides the following Print functions:

PrintAccounts

PrintCashAccounts

PrintClosingBalance

PrintClosingStock

PrintMovement

PrintOpeningBalance

PrintOpeningStock

PrintMember

PrintSubAccounts

PrintValue

PrintTotalValue

PrintNoteAccount
PrintAccounts
PrintAccounts will print an account description and balance for each account in the specified
account range (or alias range).
Syntax
PrintAccounts (#Alias, AccountType, [Hyphen])
Where:
© Sage Software Australia Pty Ltd
55
Chapter 5. Functions
Flexible Report Writer 2016

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.

[Hyphen] - Optional. Type the word "hyphen" to have the account description preceded by
a hyphen.
Example
PrintAccounts (#RevAll, CR, hyphen)
Imagine that each month your client earns $10 cash sales (entered into 0510 "Cash Sales"),
and $5 credit sales (entered into 0511 "Credit Sales"). Total revenue each month is $15.
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
- Cash Sales
- Credit Sales
10.00
5.00
10.00
5.00
10.00
5.00
30.00
15.00
PrintCashAccounts
The PrintCashAccounts function instructs HandiLedger 2016 to print a description and cash
balance for each account in the nominated account range (or alias).
HandiLedger 2016 automatically treats transactions entered via Cash Receipts, Cash
Payments, and Bank Statements as Cash Transactions. When you enter transactions
through Journal Entries, you must tick the Cash Transaction check box if the transaction is a
Cash Transaction.
Syntax
PrintCashAccounts (#Alias, AccountType, [Hyphen])
Where:

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.

[Hyphen] - Optional. Type the text "hyphen" to have the account description preceded by a
hyphen.
Example
Imagine that each month your client earns $10 cash sales, and $5 credit sales. All sales were
entered into account 0510 "Sales". The total sales for each month are $15.
PrintCashAccounts (#RevAll, CR, hyphen)
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
- Sales
56
10.00
10.00
10.00
30.00
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Add and Print functions
PrintClosingBalance
Prints an account description and closing balance value for each account in the nominated
account range (or alias). Refer to the following example for a complete explanation.
Syntax
PrintClosingBalance (#Alias, AccountType, [Hyphen])
Where:

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.

[Hyphen] - Optional. Type the text "hyphen" to have the account description preceded by a
hyphen.
Example
PrintClosingBalance (#RevAll, CR, hyphen)
Imagine that each month your client earns $10 cash sales (entered into 0510 "Cash Sales"),
and $5 credit sales (entered into 0511 "Credit Sales"). Total revenue each month is $15.
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
- Cash Sales
- Credit Sales
10.00
5.00
20.00
10.00
30.00
15.00
30.00
15.00
PrintClosingStock
The PrintClosingStock function prints an account description and closing balance value for each
account in the nominated account range (or alias). Refer to the following example for a
complete explanation.
Syntax
PrintClosingStock (#Alias, AccountType, [Hyphen])
Where:

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.

[Hyphen] - Optional. Type the text "hyphen" to have the account description preceded by a
hyphen.
Example
PrintClosingStock (#CaTradRaw, Dr)
Imagine that the closing value of raw materials was July = $5, Aug= $33, and Sept=$20.
© Sage Software Australia Pty Ltd
57
Chapter 5. Functions
Flexible Report Writer 2016
If you were to run the above report code for the client for periods 1 to 3 using the P13_1-3
format file, the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
Raw materials
5.00
33.00
20.00
20.00
PrintMovement
Calculates and then displays the difference between the opening balance and closing balance
of each account in the nominated account range.
Syntax
PrintMovement (#Alias, AccountType, [Hyphen])
Where:

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.

[Hyphen] - Optional. Type the text "hyphen" to have the account description preceded by a
hyphen.
Example
PrintMovement (#RevAll, CR)
Imagine that your client had sales of July=$15, August=$25, September=$55
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
Sales
15.00
25.00
55.00
95.00
In each column, HandiLedger 2016 calculates the movement as the closing balance less the
reporting period's opening balance (not the month's opening balance).
PrintOpeningBalance
For each account in the nominated account range, the PrintOpeningBalance function displays a
description and opening balance value.
Syntax
PrintOpeningBalance (#Alias, AccountType, [Hyphen])
Where:
58

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.

[Hyphen] - Optional. Type the text "hyphen" to have the account description preceded by a
hyphen.
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Add and Print functions
Example
PrintOpeningBalance (#RevAll, CR, hyphen)
Imagine that each month your client earns $10 cash sales (entered into 0510 "Cash Sales"),
and $5 credit sales (entered into 0511 "Credit Sales"). Total revenue each month is $15.
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
- Cash Sales
- Credit Sales
0.00
0.00
10.00
5.00
20.00
10.00
0.00
0.00
PrintOpeningStock
For each account in the nominated account range, the PrintOpeningStock function displays the
account's description and opening balance value.
Syntax
PrintOpeningStock (#Alias, AccountType, [Hyphen])
Where:

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.

[Hyphen] - Optional. Type the text "hyphen" to have the account description preceded by a
hyphen.
Example
PrintOpeningStock (#ExpTradOpRaw, Dr)
Imagine that the closing value of raw materials was:
Bolts
July = $5.00, Aug = $33.00, and Sept = $20.00
Nuts
July = $12.00; Aug = $8.00, and Sept = $3.00
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
Opening raw materials - bolts
Opening raw materials - nuts
0.00
0.00
5.00
12.00
33.00
8.00
0.00
0.00
PrintMember
Extracts and prints details of the amount distributed to a specific member, partner or
beneficiary.
Note: You must use the Distribute before the PrintMember function. This is because
HandiLedger 2016 physically distributes the profit for an entity when you rollover the client into
the next accounting year. Generally the report you are preparing is prepared before the
account year has been closed and rolled-over. The Distribute function mimics the distribution
that HandiLedger 2016 will perform when it closes the year and rolls forward.
© Sage Software Australia Pty Ltd
59
Chapter 5. Functions
Flexible Report Writer 2016
Syntax
PrintMember (Number, AccountType)
Where:

Number - Sub-account number.

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.
Example
Distribute (Profit)
x=1
While x<= TotalMembers()
PrintMember (x, Cr)
x=x+1
EndWhile
The above report code does the following:

Line One of the above report code would distribute value of the variable, "Profit", between
the partners, members or beneficiaries according to the information entered in Members,
Partners, Beneficiaries, Directors.
Note: Calculation of the value of the variable "Profit" is not visible in the above sample of
report code; however, it would have been calculated earlier in the report.

Line Two sets variable x to equal one.

Line Three compares the value in x to the total number of members. Where x is less than
or equal to the total number of members, lines four and five will be executed.

Line Four extracts and prints the profit that was distributed to MemberX (eg Member1)

Line Five of the report code increments the value of x by one.
HandiLedger 2016 will repeat lines four and five of the report code until x exceeds the total
number of members.
Imagine that your client has a profit of $180, and that each member will receive 50% of the
profits. If you ran the above report code in that situation, the result would be:
2016
$
Member One
Member Two
90.00
90.00
Note: If the above report code had not included the Distribute function at line 1, then
HandiLedger 2016 would not have temporarily distributed amounts to the members.
Consequently, a value of zero (0, - or blank) would print for each member.
PrintSubAccounts
The PrintSubAccounts function prints a description and value for each sub-account in the
specified account range.
Unless you use the SetSubAccount function to define the sub-accounts to print, all subaccounts in the specified account range will be printed. For information on the SetSubAccount
function, see "SetSubAccount" on page 76.
Syntax
PrintSubAccounts (#Alias, AccountType, [Hyphen])
Where:
60
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Add and Print functions

#Alias -Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.

[Hyphen] - Optional. Type the text "hyphen" to have the account description preceded by a
hyphen.
Example
Imagine that you ran the above report code for an entity that had:
Sales of Orange Juice (recorded into account 0510.01 and sales of Flavoured Milk (recorded in
0510.02). During the first three months of the year, sales were:
Orange Juice - July=$100;
Aug = $325;
Sept = $130
Flavoured Milk July=$35;
Aug = $240;
Sept = $180
PrintSubAccounts (#RevAll, CR, hyphen)
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
- Orange Juice
- Flavoured Milk
100.00
35.00
325.00
240.00
130.00
180.00
555.00
455.00
PrintValue
The PrintValue function prints a variable's stored value. HandiLedger 2016 prints the value and
associated description in a regular (non-bold) font.
Syntax
PrintValue ("Text", Variable, AccountType, [Underline], [Note], [Band])
Where:

"Text" - Text to be printed in the Description column in the report.

Variable - Name of the variable that contains the value to print.

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.

[Underline] - Optional. Type of line to draw around the printed value. The following
underline types are available:
NoLine – No line to print above or below the value.
BothLines – Single line to print both above and below the value.
DoubleUnderLine – No line to print above the value, and a double line to print below the
value.
DoubleLines – Single line to print above the value, and a double line to print below the
value.
DoubleOverLine – Single line to print above the value, and no line to print below the value.

[Note] – Optional. Note number to print. This syntax element is used in the Profit & Loss
Account and Balance sheet. It enables you to insert a reference to one of the Notes.
© Sage Software Australia Pty Ltd
61
Chapter 5. Functions

Flexible Report Writer 2016
[Band] - Optional. Use the Band to force information to be printed on the same page. For
example, if you were printing the following you would not want any of the information to be
split over two pages.
Non-Current assets
Mazda
20000
Less: Accumulated Depreciation
3000
17000
Example
Revenue = PrintAccounts (#RevAll, CR)
PrintValue ("Total Revenue", Revenue, Cr, BothLines)
Imagine that each month your client earns $10 cash sales (entered into 0510 "Cash Sales"),
and $5 credit sales (entered into 0511 "Credit Sales"). Total revenue each month is $15.
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
Cash Sales
Credit Sales
Total Revenue
10.00
5.00
15.00
10.00
5.00
15.00
10.00
5.00
15.00
30.00
15.00
45.00
PrintTotalValue
The PrintTotalValue function prints a variable's stored value. HandiLedger 2016 prints the value
and associated description in a bold font.
Syntax
PrintTotalValue ("Text", Variable, AccountType, [Underline], [Note], [Band])
Where:

"Text" - Text to be printed in the Description column in the report.

Variable - Name of the variable that contains the value to print.

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.

[Underline] - Type of line to draw around the printed value. The following underline types
are available:
NoLine - No line to print above or below the value.
BothLines - Single line to print both above and below the value.
DoubleUnderLine - No line to print above the value, and a double line to print below the
value.
DoubleLines - Single line to print above the value, and a double line to print below the
value.
DoubleOverLine - Single line to print above the value, and no line to print below the value.
62

[Note] - Optional. Note number to print. This syntax element is used in the Profit & Loss
Account and Balance sheet. It enables you to insert a reference to one of the Notes.

[Band] - Optional. Use the Band to force information to be printed on the same page. For
example, if you were printing the following you would not want any of the information to be
split over two pages.
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Add and Print functions
Non-Current assets
Mazda
20000
Less: Accumulated Depreciation
3000
17000
Example
Revenue = PrintAccounts (#RevAll, CR)
PrintTotalValue ("Total Revenue", Revenue, Cr, BothLines)
Imagine that each month your client earns $10 cash sales (entered into 0510 "Cash Sales"),
and $5 credit sales (entered into 0511 "Credit Sales"). Total revenue each month is $15.
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
Cash Sales
Credit Sales
Total Revenue
10.00
5.00
15.00
10.00
5.00
15.00
10.00
5.00
15.00
30.00
15.00
45.00
PrintNoteAccount
The PrintNoteAccount function will print information from the Note Information Accounts area of
HandiLedger 2016. To see the Note Information Accounts area of HandiLedger 2016, from the
Reports menu, click Note Information Accounts.
Syntax
PrintNoteAccount ("NoteAccount", AccountType, [Underline])
Where:

"NoteAccount" - Name of the Note Information Account to be printed.

AccountType - The type of account to apply the function to. The available AccountTypes
are listed in the Glossary of Terms.

[Underline] - Type of line to draw around the printed value. The following underline types
are available:
NoLine - No line to print above or below the value.
BothLines - Single line to print both above and below the value.
DoubleUnderLine - No line to print above the value, and a double line to print below the
value.
DoubleLines - Single line to print above the value, and a double line to print below the
value.
DoubleOverLine - Single line to print above the value, and no line to print below the value.
Example
PrintNoteAccount ("TaxPayable", CR)
© Sage Software Australia Pty Ltd
63
Chapter 5. Functions
Flexible Report Writer 2016
Imagine that you had completed the Note Information Accounts area as illustrated below.
If you ran the above report code for the client using the DCP format file, the result would be:
Prima facie income tax payable
on operating profit at 30%.
200,458.50
Text functions
The following functions allow you to display text in your report:

AddText

AddTabText

AddColumnText

AddDescription
AddText
The AddText function displays text information in your report. The Text prints across all
columns. It is not restricted to the width of the Description column.
Syntax
AddText ("Text", [Font], [Style], [Band])
Where:
64

"Text" - Text to be displayed in the report. The text must be enclosed in quotation (" ")
marks.

[Font] - Optional. Font to be used when the text is displayed. To define or view font styles,
from the Options menu, click Fonts.

[Style] - Optional. The font style to use. You can select from: Bold, Italic, Underline,
Normal, or a combination e.g. BoldItalicUnderline, UnderlineItalic etc.

[Band] - Optional. Name of the band with which the text must be grouped. This will cause
text from the AddText function to print on the same page as all other information contained
in the band. Refer to the following example for more information.
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Text functions
Example
TaxBand = AddMainHeading ("Income Tax")
AddText ("Income tax has been …", BodyText, Italic, TaxBand)
In the above example:

Line One of report code creates the Band, "TaxBand".
Note: To create a band, insert a name and an equals sign in front of one of the text
functions (eg AddText, AddMainHeading etc).

Line Tow prints the text "Income tax has been …". This text prints in BodyText in italic font.
The "TaxBand" section of line two assigns the "Income tax has been ..." text to the
TaxBand. Anything assigned to the TaxBand will print on the same page. Consequently, in
the above example, HandiLedger 2016 would never insert a page break between "Income
Tax" and "Income tax has been …"
AddTabText
The AddTabText function allows you to indent text a specified number of millimetres.
Syntax
AddTabText ("Text1", Width1, "Text2", Width2, …)
Where:

"Text1" - Text to print at the margin.
Note: Width1 dictates the width over which Text1 will print. Text1 will not print past the
Width1 position.

Width1 - Position of the first tab.

"Text2" - Text to print between the Width1 and Width2 positions.
Note: Width2 dictates the width over which Text2 will print. Text2 will not print past the
Width2 position.

Width2 - Position of the second tab.
Note
Where the text is to take up the full width of the page, use a Width of zero. The following
example illustrates this.
Example
AddTabText ("1.", 10, "a)", 10, "Property", 0)
AddTabText ("", 10, "", 10, "Freehold land and buildings are …", 0)
The above report code would cause the following to be displayed:
1.
a)
Property
Freehold land and buildings are…
Note1: "Property" and "Freehold land and buildings are …" will both print over the remaining
width of the page. This is because Width3 the code specifies as 0 (zero).
Note2: You could also write line two of the report code as: AddTabText ("", 20, "Freehold land
and buildings are …", 0).
© Sage Software Australia Pty Ltd
65
Chapter 5. Functions
Flexible Report Writer 2016
AddColumnText
Each time you run a report, you must apply a format file to the report file. The format file
specifies the number of columns across the page. The AddColumnText function allows you to
add text information into a specific column.
Syntax
AddColumnText ("Text1", "Text2", …)
Where:

"Text1" - Text to print in the first column of the report.

"Text2" - Text to print in the second column of the report.

etc
Example
AddColumnText ("Column1", "Column2", "Column3")
AddColumnText ("", "Accounts", "")
If you printed the above report code using the DCP format file, the following would display:
2016
2016
$
$
Column1
Column2
Accounts
Column3
AddDescription
Before you run a report, you must apply a format file to the report file. The format file specifies
the number of columns across the page. The AddDescription function allows you to print text
into the description column.
Syntax
AddDescription ("Text")
Where:

"Text" - Text to print in the description column. The text must be enclosed in quotation
marks.
Note
If the text is wider than the description column, the text will wrap within the column.
Some formats do not use the first column as the description column (e.g. PDC, which prints the
prior year amounts, description, and current year amounts). The AddDescription function prints
text in the description column, regardless of where the description column appears.
Example
AddDescription ("Standby arrangements with banks to provide funds and support facilities")
If you ran the above report code using the DCP format file, the following would display:
2016
2016
$
$
Standby arrangements with banks to provide
funds and support facilities
66
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Functions affecting the report's appearance
Functions affecting the report's appearance
The following functions affect the appearance of your report:

AddFooter

AddHeader

AddImage

AddMainHeading

AddSubHeading

SkipSpace

PageBreak
Tip: The format file that is used when you generate a report also determines the appearance
of the report. For information on format files, see "Format files and report files" in Chapter 1,
"Introduction".
AddFooter
The AddFooter function prints footer information on the bottom of each page of the report.
Syntax
AddFooter (“Text”)
Where:

"Text" - Text to be printed in the Footer. The text must be enclosed in quotation marks.
Note
You can use multiple Footers within the same report file. If HandiLedger 2016 finds a new
Footer within a report file, from that point onwards it prints the new footer at the bottom of each
page.
The footer (or first footer if there is more than one footer) should be the second line in a report
file (this is the line directly after the Header). Otherwise; the first page may print without a
footer.
Example
AddFooter ("The accompanying notes form part of these financial statements.")
The above report code would result in the following information printing at the bottom of each
page in your report:
The accompanying notes form part of these financial statements.
AddHeader
The AddHeader function prints a title, date and column headings at the top of each page of the
report.
Syntax
AddHeader ("Text", DateType, TitleType)
Where:

"Text" - Text to be printed in the Header. The text must be enclosed in quotation marks.
© Sage Software Australia Pty Ltd
67
Chapter 5. Functions
Flexible Report Writer 2016
Note: If the report is included in the preferred reports setup, the Report Writer will ignore the
text entered here and use the name given to the report instead. If you do not want this to
happen, you must use the AddHeaderText function.

DateType - Style of date to be printed in the Header. The various DateTypes are:
NoDate - No date is displayed.
Example: AddHeader ("Independent Audit Report", NoDate, NoTitle)
AsAtDate - As at DD/MM/YYYY.
Example: AddHeader ("Trial Balance", AsAtDate, TwoTitle)
PeriodDate - For the period ended DD/MM/YYYY.
Example: AddHeader ("Income & Expenditure Statement", PeriodDate, TwoTitle)

TitleType - Column title type to be printed in the Header. The various TitleTypes are:
NoTitle - Name and ACN of the entity.
Example: Example: AddHeader ("Independent Audit Report", NoDate, NoTitle)
OneTitle - Name and ACN of the entity and the year (or month) and year.
Example: AddHeader ("Statement of Cash Flows", PeriodDate, OneTitle)
TwoTitle - Name and ACN of the entity and the year (or month). For trial balance formats,
Debit and Credit column headings also display.
Example: Example: AddHeader ("Income & Expenditure Statement", PeriodDate, TwoTitle)
Note: You should not use AddHeader more than once within the same report file. If you want
pages to have different headers, you should use AddHeaderText.
Example
AddHeader ("Trial Balance", AsAtDate, TwoTitle)
If you ran the above report code, each page of the report would display the following at the top
of each page:
Entity Name
Trading Name
Trial Balance As At 30 June, 2016
2015
$ Dr
2016
$ Cr
Note: If the report is included in the preferred reports setup, it would ignore the text "Trial
Balance" and display the top of each page as follows:
Entity Name
Trading Name
<Report Name> As At 30 June, 2016
2015
$ Dr
2016
$ Cr
AddHeaderText
The AddHeaderText function is similar to the AddHeader function. It prints a title, date and
column headings at the top of each page of the report. Unlike AddHeader, it does not substitute
the text with the report name if the report is part of the preferred reports setup. You must use
AddheaderText if you want your report pages to have different headers.
68
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Functions affecting the report's appearance
Syntax
AddHeaderText ("Text", DateType, TitleType)
Where:

"Text" - Text to be printed in the Header. The text must be enclosed in quotation marks.

DateType - Style of date to be printed in the Header. The various DateTypes are:
NoDate - No date is displayed.
Example: AddHeaderText ("Independent Audit Report", NoDate, NoTitle)
AsAtDate - As at DD/MM/YYYY.
Example: AddHeaderText ("Trial Balance", AsAtDate, TwoTitle)
PeriodDate - For the period ended DD/MM/YYYY.
Example: AddHeaderText ("Income & Expenditure Statement", PeriodDate, TwoTitle)

TitleType - Column title type to be printed in the Header. The various TitleTypes are:
NoTitle - Name and ACN of the entity.
Example: Example: AddHeaderText ("Independent Audit Report", NoDate, NoTitle)
OneTitle - Name and ACN of the entity and the year (or month) and year.
Example: AddHeaderText ("Statement of Cash Flows", PeriodDate, OneTitle)
TwoTitle - Name and ACN of the entity and the year (or month). For trial balance formats,
Debit and Credit column headings also display.
Example: Example: AddHeaderText ("Income & Expenditure Statement", PeriodDate,
TwoTitle)
Note
You can use more than one header within the same report file. When HandiLedger 2016 finds
a new Header in a report file, from that point onwards it prints the new header at the top of each
page.
Note: A new header triggers a new page. If HandiLedger 2016 finds a new header, and it has
not printed a full page, it will still commence a new page.
The header (or first header if there is more than one) should be the first line in a report file,
otherwise the first page may print without a header.
Example
AddHeaderText ("Trial Balance", AsAtDate, TwoTitle)
If you ran the above report code, each page of the report would display the following at the top
of each page:
Entity Name
Trading Name
Trial Balance As At 30 June, 2016
2015
$ Dr
2016
$ Cr
AddImage
The AddImage function enables you to print a graphical image in your report.
Syntax
AddImage ("FileName", [Left], [Top], [Width], [Height], [Band])
Where:
© Sage Software Australia Pty Ltd
69
Chapter 5. Functions
Flexible Report Writer 2016

"FileName" - Location and file name of the image on your computer.

[Left] - Optional. Amount by which to indent the image from the left-hand margin.

[Top] - Optional. Amount by which to drop down the image from the top of the margin.

[Width] - Optional. Width over which the image is to print.
Note: Specifying a width will distort your image if the width is different to the width of the
image.
Use a Width of 0 (zero) to print the image using its actual width.

[Height] - Optional. Height over which the image is to print.
Note: Specifying a height will distort your image if the height is different to the height of the
image.
Use a Height of 0 (zero) to print the image using its actual height.

[Band] - Optional. Name of the band that the text must print with. This will cause image
and the text in the Band to print on the same line in the report.
Note
You can use .bmp, .jpg (or .jpeg) and .wmf image formats.
Example
Logo = AddSubHeading ("ABC Accounting Pty Ltd")
AddImage ("c:\CoyLogo.jpg", 70,20,0,0, Logo)
In the above example, line one of the report code creates the band "Logo". The text associated
with the band is the sub-heading "ABC Accounting Pty Ltd". Line two of the report code prints
the image "CoyLogo". Because the AddImage function links to the Logo band, the sub-heading
and image will print on the same line in the report.
AddMainHeading
The AddMainHeading (“Text”, Font) function allows you to print a description in a report (e.g.
Liabilities). The main heading is printed using the font attributes for "MainHeading", unless you
specify otherwise.
Note: To access the Fonts area, from the Options menu, click Fonts
Syntax
AddMainHeading (“Text”, Font)
Where:

"Text" - Text to form the heading. The text must be surrounded by quotation marks.

Font - Optional.
Leaving the Font element blank is the equivalent of specifying the font style of
MainHeading. I.e., AddMainHeading ("Liabilities") produces the same result as
AddMainHeading ("Liabilities", MainHeading).
If you do not want the text to print with the "MainHeading" font attributes, elect another font
style to use. E.g. AddMainHeading ("Liabilities", BodyText).
Note
The main heading is displayed wholly within the description column specified by the format file.
Where the heading is wider than the description column, HandiLedger 2016 wraps the heading
within the description column.
70
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Functions affecting the report's appearance
Example
AddMainHeading ("Liabilities")
AddSubHeading
The AddSubHeading (“Text”, Font) function allows you to print a description in a report (e.g.
Current Liabilities). The sub heading is printed using the font attributes for "SubHeading",
unless you specify otherwise.
Note: To access the Fonts area, from the Options menu, click Fonts
Syntax
AddSubHeading ("Text", Font)
Where:

"Text" - Text to form the subheading. The text must be surrounded by quotation marks.

Font - Optional.
Leaving the Font element blank is the equivalent of specifying the font style of SubHeading.
I.e., AddSubHeading ("Current Liabilities") produces the same result as AddSubHeading
("Current Liabilities", SubHeading).
If you do not want the text to print with the "SubHeading" font attributes, elect another font
style to use. E.g. AddSubHeading ("Current Liabilities", BodyText).
Note
The text for the sub-heading will display wholly within the description column. The format file
specifies the description column. Where the heading is wider than the description column,
HandiLedger 2016 wraps the heading within the description column.
Example
AddSubHeading ("Current Liabilities")
SkipSpace
The SkipSpace () function allows you to leave a blank space within a report.
Syntax
SkipSpace (Height, [Band])
Where:

Height - The amount of space to leave, in millimetres.

[Band] - Optional. Name of the band in which the space must be printed. Refer to the
following example for more information.
Example
Sig = AddText ("Signed by:")
SkipSpace (15, Sig)
AddText ("_____________________________________", BodyText, Normal, Sig)
AddText ("Member1", BodyText, NormalSig)
The above report code prints an area where a member of the entity can sign the report. A
space is required between the text "Signed by", and the line on which the client will sign. The
SkipSpace function allows you to insert this space.
You would not want a page break to occur within the signature block. As a result, you must
place the signature area in a band.
© Sage Software Australia Pty Ltd
71
Chapter 5. Functions
Flexible Report Writer 2016
The above report code would print the following:
Signed by:
_______________________________________________
John Doe
PageBreak
The PageBreak () function will insert a new page wherever the PageBreak function is located in
your report file.
Syntax
PageBreak ()
Example
AddText ("Page One")
PageBreak ()
AddText ("Page Two")
The above report code would print the text "Page One" on the first page of the report. It would
then print the text "Page Two" on the second page of the report.
Functions for If…EndIf statements
The following functions are generally used with If…EndIf statements. They may also be used
with While…EndWhile statements

IsNotZero

KeyIsCredit

KeyIsDebit

HasSubAccounts
IsNotZero
Instructs HandiLedger 2016 to check whether the value of a variable is zero.
Syntax
IsNotZero (Variable)
Where:

Variable -Name of the variable that HandiLedger 2016 will check.
Note
You will often use the IsNotZero function in conjunction with If…EndIf statements.
Example 2
Bank = AddAccounts (#CaBank, Dr)
If IsNotZero(Bank) then
PrintValue ("Bank balance", Bank, Dr)
EndIf
72
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Functions for If…EndIf statements
In the above example:

Line One adds the value of all accounts in the #CaBank alias and then stores the total value
in the variable Bank.

Line Two checks the value of Bank to see if it is zero. If Bank does not equal zero, then
HandiLedger 2016 executes Line Three. Where Bank is equal to zero, HandiLedger 2016
skips Line Three, and no value is prints.

Line Three prints the description "Bank balance", and the value of the Bank variable.
KeyIsCredit
Instructs HandiLedger 2016 to check the value of the key column* for this variable to determine
if it is in Credit.
*Key column is defined in the Glossary of Terms.
Syntax
KeyIsCredit (Variable)
Where:

Variable - Name of the variable that HandiLedger 2016 will check.
Example
Bank = AddAccounts (#CaBank, Dr)
If KeyIsCredit(Bank) then
PrintValue ("Bank overdraft", Bank, Cr)
Else
PrintValue ("Cash at bank", Bank, Dr)
EndIf
In the above example, a different description will print, depending on if the balance of the bank
in the key column is in debit or credit.
KeyIsDebit
Instructs HandiLedger 2016 to check the value of the key column figure for this variable to
determine if it is in Debit.
Key Column: The key column is specified in the format file that is applied to the report file. The
key column is generally the 'current year' column. Using the KeyIsDebit and KeyIsCredit
functions, you can check to see if a variable has a debit or a credit value for the key column.
Combining these functions with an If…ElseIf statement then enables you to have the report
display the variable differently, depending on if it is in debit or in credit.
Syntax
KeyIsDebit (Variable)
Where:

Variable - Name of the variable that HandiLedger 2016 will check.
Example
Bank = AddAccounts (#CaBank, Dr)
If KeyIsDebit(Bank) then
PrintValue ("Cash at bank", Bank, Dr)
Else
PrintValue ("Bank overdraft", Bank, Cr)
EndIf
In the above example, a different description will print, depending on if the balance of the bank
in the key column is in debit or credit.
© Sage Software Australia Pty Ltd
73
Chapter 5. Functions
Flexible Report Writer 2016
HasSubAccounts
Instructs HandiLedger 2016 to check the nominated range of accounts to see if they contain any
sub-accounts.
Syntax
HasSubAccounts (#Alias)
Where:

Variable - Name of the variable that HandiLedger 2016 will check.
Example
Borr = Zero
If (IsTrustee) then
If HasSubAccounts(#ClUnTrustLiab) then
AddText ("Liabilities incurred as trustee of:")
Borr = Borr + PrintSubAccounts (#ClUnTrustLiab, CR, hyphen)
Else
Borr = Borr + PrintAccounts (#ClUnTrustLiab, CR, hyphen)
EndIf
Endif
The above report code does the following:

Line One sets the variable, "Borr", to equal zero.

Line Two checks to see if the entity is a Trustee. If it is a trustee, then HandiLedger 2016
executes Line Three. If the entity is not a trustee, the If statement has been failed, and
HandiLedger 2016 skips the content of the If statement and goes directly to Line Nine.

Line Three checks to see if sub-accounts exist within the account alias #ClUnTrustLiab. If
sub-accounts exist in that account range then HandiLedger 2016 executes Line Four.
Where there are no sub-accounts, the If statement has been failed and HandiLedger 2016
skips the content of the If statement and goes directly to Line Six.

Line Four prints the text "Liabilities incurred as trustee of:".
Note: This text will only be printed if the entity is a Trustee and has sub-accounts in the
alias account range #ClUnTrustLiab).

Line Five sets the variable "Borr" to equal the original value of "Borr", plus the value of the
sub-accounts in the #ClUnTrustLiab alias account range.

Line Six indicates the start of the report code that HandiLedger 2016 will execute if the "If
HasSubAccounts…" If statement is failed.

Line Seven sets the variable "Borr" to equal the original value of "Borr", plus the value of
the accounts in the #ClUnTrustLiab alias account range.

Line Eight indicates the end of the "If HasSubAccounts…" If statement.

Line Nine indicates the end of the "If (IsTrustee)…" If statement.
Miscellaneous functions
The following miscellaneous functions are available:
74

CreditOnly

DebitOnly

AliasStart…AliasEnd

SetRatio

SetSubAccount
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016

GetSubDescription

Distribute

Net

GetMemberName

TotalPartners

TotalBeneficiaries

TotalDirectors

TotalMembers
Miscellaneous functions
CreditOnly
The CreditOnly function performs an action only where the specified variable has a credit
balance.
Syntax
CreditOnly (Variable)
Where:

Variable - Variable, or report code, that HandiLedger 2016 is to evaluate to determine if the
item has a credit balance.
Example
Bank = CreditOnly (AddAccounts(#CaBank, Cr))
PrintValue ("Credit bank balance", Bank, Cr)
The above report code calculates the credit balance of the #CaBank alias range. Where the
alias has a debit balance, a value of zero is stored in the Bank variable for later use. Where the
alias has a credit balance, the exact credit balance amount is stored in the variable Bank.
If your client's bank account has a balance of $1,000 Dr, the above report code would print a
value of zero. If the client had a bank balance of $300 Cr, then the above report code would
print $300.
DebitOnly
The DebitOnly function performs an action only where the specified variable has a debit
balance.
Syntax
DebitOnly (Variable)
Where:

Variable - Variable, or report code, that HandiLedger 2016 is to evaluate to determine if the
item has a credit balance.
Example
Bank = DebitOnly (AddAccounts(#CaBank, Dr))
PrintValue ("Debit bank balance", Bank, Dr)
The above report code calculates the debit balance of the #CaBank alias range. Where the
alias has a credit balance, a value of zero is stored in the Bank variable for later use. Where
the alias has a debit balance, the exact debit balance amount is stored in the variable Bank.
© Sage Software Australia Pty Ltd
75
Chapter 5. Functions
Flexible Report Writer 2016
If your client's bank account has a balance of $1,000 Dr, the above report code would print a
value of $1,000. If the client had a bank balance of $300 Cr, then the above report code would
print a value of zero.
AliasStart … AliasEnd
The AliasStart...AliasEnd functions are used in conjunction with commands that perform an
action on an account range or alias (e.g. AddAccounts function). The AliasStart..AliasEnd
commands allow you to use multiple aliases in the same function
Syntax
AliasEnd (#Alias), AliasStart (#Alias)
Where:

#Alias - Alias name, or account range. (Note: If required, you can type an exact account
number or account range rather than using an alias name).
Example
PrintAccounts (AliasStart (#CaBank), AliasEnd (#CaOtherCash), DR)
In the above example, a description and value will be printed for all accounts starting from the
first account code in the #CaBank alias, to the last account code in the #CaOtherCash alias.
SetRatio
The SetRatio function enables a total to be set for the ratio. If you run a report, which contains
a SetRatio function, using a format file with a Ratio column, then the Ratio column displays a
value as a percentage of the SetRatio variable. HandiLedger 2016 expresses the column
immediately to the left of the Ratio column as a percentage of the SetRatio variable.
Syntax
SetRatio (Variable)
Where:

Variable - The item to be used as the ratio total.
Example
TotalRev = AddAccounts (#RevAll, Cr)
SetRatio (TotalRev)
PrintAccounts (#RevAll, Cr)
PrintTotalValue ("Total revenue", TotalRev, Cr, BothLines)
Imagine that each month your client earns $10 cash sales and $5 credit sales. Total revenue
each month is $15.
If you ran the above report code for the entire year using the DCP_RAT format file, the result
would be:
2016
%
$
Cash Sales
Credit Sales
Total revenue
120.00
60.00
180.00
66.67
33.33
100.00
SetSubAccount
The SetSubAccount function allows you to set the sub-account number that HandiLedger 2016
is to use. After you have used the SetSubAccount function, you must reset the sub-accounts
using SetSubAccount(0).
76
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Miscellaneous functions
You can use the SetSubAccount function in conjunction with While…EndWhile statement, and
AddSubAccounts function.
Syntax
SetSubAccount (Sub-account)
Where:

Sub-account - Sub-account's number.
Example
x=1
While x<=2
SetSubAccount (x)
Revenue = AddSubAccounts (#RevAll, CR)
PrintValue ("Sales – sub account "+x, Revenue, Cr)
x=x+1
EndWhile
SetSubAccount(0)
Imagine that your client records sales of Orange Juice in account 0510.01, and sales of
Flavoured Milk in account 0510.02. During the first three months of the year, sales were:
Orange Juice
July=$100
Aug=$325
Sept=$130
Flavoured Milk
July=$35
Aug=$240
Sept=$180
If you ran the above report code for the client for periods 1 to 3 using the P13_1-3 format file,
the result would be:
Jul
Aug
Sept
Jul $
$
$
Sept
$
Sales - sub account 1
Sales - sub account 2
100.00
35.00
325.00
240.00
130.00
180.00
555.00
455.00
The above report code initially sets variable x to equal one. As this meets the criteria of the
While…EndWhile statement, HandiLedger 2016 will execute the code between the While and
EndWhile. This results in
1. The SetSubAccount function setting the sub-account to equal one
2. Revenue is calculated for sub-account one, and is stored in the variable Revenue
3. The line "Sales …" is then printed for sub-account 1
4. Variable x is incremented by one, leaving the variable with a value of two. The
While…EndWhile statement is then repeated for x=2.
GetSubDescription
The GetSubDescription function returns the sub-account description value as set up in Reports
/ Sub Account Descriptions (not the specific account description in the Chart of Accounts).
Syntax
GetSubDescription (Sub-account)
Where:

Sub-account - Sub-account's number.
© Sage Software Australia Pty Ltd
77
Chapter 5. Functions
Flexible Report Writer 2016
Example
x=1
While x<=2
AddMainHeading (GetSubDescription(x), MainHeading)
x=x+1
EndWhile
Distribute
The Distribute function distributes the profit or loss for the current year in a partnership, trust, or
superannuation fund report.
Syntax
Distribute (Variable)
Where:

Variable - Variable to distribute in accordance with the distribution recorded in Members,
Partners, Beneficiaries, Directors, which is on the View menu.
Note
HandiLedger 2016 physically distributes the profit for an entity when you rollover the client into
the next accounting year. Often you will want to produce a report that shows the current year's
profit distribution. Generally, this would not be possible because HandiLedger 2016 does not
distribute the profit until you close the year. The Distribute function allows you to print a report
that includes a profit distribution, even when you have not closed and rolled over the accounting
year.
Example
Distribute (Profit)
x=1
While x<= TotalMembers()
PrintMember (x, Cr)
x=x+1
EndWhile
The above report code does the following:

Line One of the above report code would distribute the value of the variable "Profit"
between the partners, members or beneficiaries according to the information entered in
Members, Partners, Beneficiaries, Directors.

Note: Calculation of the variable "Profit" is not visible in the above sample of report code,
however, it would have been calculated earlier in the report.

Line Two sets variable x to equal one.

Line Three compares the value in x to the total number of members. Where x is less than
or equal to the total number of members, lines four and five will be executed.

Line Four extracts and prints the profit that was distributed to MemberX (eg Member1)

Line Five of the report code increments the value of x by one.
Note: HandiLedger 2016 will repeat lines four and five of the report code until x exceeds the
total number of members.
78
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Miscellaneous functions
Imagine that your client has a profit of $180, and that the client will distribute 50% of the profits
to each member. If you run the above report code in that situation, the result would be:
2016
$
Member One
Member Two
90.00
90.00
Note: If the above report code had not included the Distribute function at line 1, then no values
would distribute to the members. Consequently, a value of zero (0, - or blank) would print for
each member.
Net
The Net function is used to offset one or more variables against each other. It is generally only
used in Trial Balance reports.
Syntax
Net (Variable1 + Variable2)
Where:

Variable1 - A variable calculated within the report code.

Variable2 - A variable calculated within the report code.
Note
You will see the Net function in use in the Sage HandiSoft Trial Balance report file.
Example
The following report code is an extract from a Trial Balance. Note: The report code would have
calculated the Income and Expense variables before the Net function.
Profit = Net (Income + Expenses)
If KeyIsDebit (Profit) then
PrintTotalValue ("Net Loss", Profit, TB, NoLine)
Else
PrintTotalValue ("Net Profit", Profit, TB, NoLine)
Endif
GetMemberName
The GetMemberName function obtains the member's, partner's, beneficiary's, or director's
name from the Members, Partners, Beneficiaries, Directors area.
Syntax
GetMemberName (Number)
Where:

Number - Sub-account number for the member, partner, beneficiary, or directory.
Note: To view the sub-account number assigned to each person, from the View menu,
click Members, Partners, Beneficiaries, Directors.
Example
AddText (GetMemberName(1))
The above example would print the name of member, partner, beneficiary or director who is
listed first in the Members, Partners, Beneficiaries, Directors area in HandiLedger 2016.
© Sage Software Australia Pty Ltd
79
Chapter 5. Functions
Flexible Report Writer 2016
TotalPartners
The TotalPartners function obtains the total number of partners in a partnership.
Syntax
TotalPartners()
Example 1
AddText (TotalPartners())
The above example would print the total number of partners in a partnership.
Example 2
x = 1
While x <= TotalPartners()
AddText (GetMemberName(x))
x=x+1
EndWhile
Line one in the above report code sets the variable x to equal one. Line two of the report code
compares the value of x to the total number of partners. Where x is less than or equal to the
total number of partners then lines three and four of the report code are executed. Line three
prints the name of the partner. Line four increments the x by one, resulting in the variable now
being equal to two. The above process will repeat from line two until variable x exceeds the
number of total partners.
TotalBeneficiaries
The TotalBeneficiaries function obtains the total number of beneficiaries in a trust.
Syntax
TotalBeneficiaries()
Example 1
AddText (TotalBeneficiaries())
The above example would print the total number of beneficiaries in a trust.
Example 2
x = 1
While x <= TotalBeneficiaries()
AddText (GetMemberName(x))
x=x+1
EndWhile
Line one in the above report code sets the variable x to equal one. Line two of the report code
compares the value of x to the total number of beneficiaries. Where x is less than or equal to
the total number of beneficiaries then lines three and four of the report code are executed. Line
three prints the name of the beneficiary. Line four increments the x by one, resulting in the
variable now being equal to two. The above process will repeat from line two until variable x
exceeds the number of total beneficiaries.
80
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Miscellaneous functions
TotalDirectors
The TotalDirectors function obtains the total number of directors in a company.
Syntax
TotalDirectors()
Example 1
AddText (TotalDirectors())
The above example would print the total number of directors in a company.
Example 2
x = 1
While x <= TotalDirectors()
AddText (GetMemberName(x))
x=x+1
EndWhile
Line one in the above report code sets the variable x to equal one. Line two of the report code
compares the value of x to the total number of directors. Where x is less than or equal to the
total number of directors then lines three and four of the report code are executed. Line three
prints the name of the director. Line four increments the x by one, resulting in the variable now
being equal to two. The above process will repeat from line two until x exceeds the number of
total directors.
TotalMembers
The TotalMembers function obtains the total number of members in a superannuation fund.
Syntax
TotalMembers()
Example 1
AddText (TotalMembers())
The above example would print the total number of members in a superannuation fund.
Example 2
x = 1
While x <= TotalMembers()
AddText (GetMemberName(x))
x=x+1
EndWhile
Line one in the above report code sets the variable x to equal one. Line two of the report code
compares the value of x to the total number of members. Where x is less than or equal to the
total number of members, lines three and four of the report code are executed. Line three prints
the name of the member. Line four increments the x by one, resulting in the variable now being
equal to two. The above process will repeat from line two until x exceeds the number of total
members.
© Sage Software Australia Pty Ltd
81
Chapter 6.
Statements
A statement is the smallest executable item within a programming language.
If…EndIf statements
If…EndIf statements allow you to execute report code only in certain circumstances.
Syntax
If (Condition) Then
{various lines of report code}
EndIf
Where:

Condition - The condition that the entity must meet before HandiLedger 2016 runs the
following lines of report code. Often the condition that you write will include operators.
An operator allows you to perform a mathematical evaluation (e.g. x<=10 checks to see if
variable x is less than or equal to 10).
Refer to the Appendix for a list of available operators.
Example 1
If IsCompany then
AddText ("This entity is a Company")
EndIf
Line one of the above report code checks to see if the entity is a company. Where the entity is
a company, then (and only then) line two of the code is executed. Line two would result in the
text "This entity is a Company" being printed. If the entity were not a company, the above report
code would not do anything.
Example 2
If IsCompany then
If IsAssociation
AddText ("This
ElseIf IsTrustee
AddText ("This
Else
AddText ("This
EndIf
EndIf
then
company is an Association")
then
company is a Trustee Company")
entity is a standard company")
In the above example:

Line one checks to see if the entity is a company. Where the entity is a company,
HandiLedger 2016 will then run line two. Where the entity is not a company, HandiLedger
2016 will run line nine

Line two checks to see if the company is an association. If it is an association, line three
executes. Where the entity is not an association, line four executes.
© Sage Software Australia Pty Ltd
83
Chapter 6. Statements
Flexible Report Writer 2016

Line three prints the description "This company is an Association" to print. After this line
has been run, HandiLedger 2016 moves to the end of the current If…EndIf statement, which
is line eight.

Line four checks to see if the company is a trustee. If it is, then line five will execute. If it is
not, then line six will run.

Line five prints the description "This company is a Trustee Company". After this line has
been run, HandiLedger 2016 moves to the end of the current If…EndIf statement, which is
line eight.

Line six directs HandiLedger 2016 to line seven. Effectively line seven is run where none
of the other conditions in the If statement have been met.

Line seven prints the description "This is a standard company".

Line eight ends the second If statement (which commenced at line two).

Line nine ends the first If statement (which commenced at line one).
GroupStart() … GroupEnd() statements
Often you will want certain items in a report to print only if they contain values. For example, if
you had a report that printed a heading "Income", and then printed each income account, you
would only want the "Income" heading to print if income accounts were also to print. You can
do this using the GroupStart () … GroupEnd () statements.
Where the lines surrounded by GroupStart () … GroupEnd () do not result in a printed value,
then HandiLedger 2016 ignores all of those lines. Where a single line in the group results in a
printed value, then all of the lines enclosed with GroupStart () … GroupEnd () will print.
Syntax
GroupStart (n)
{various lines of report code}
GroupEnd (n)
Where:
n - An optional number. This number allows you to match up the GroupStart and GroupEnd
statements.
If you omit this optional number, you must still include brackets in the GroupStart and
GroupEnd statements. I.e. GroupStart would be invalid. You must use GroupStart ().
Note: For each GroupStart() statement, you must have a GroupEnd() statement. If you do not,
then the report file may produce the wrong result when it executes.
Example
GroupStart (1)
AddMainHeading ("Funds from operations (note 1)")
AddDescription ("Inflows of funds from operations")
GroupStart (2)
Sales = AddMovement(AliasStart(#RevMan),AliasEnd(#RevSales),CR)
Sales = Sales + AddMovement (#StockMovement, CR)
PrintValue ("Sales revenue", Sales, CR)
GroupEnd (2)
GroupEnd(1)
In the above report code:
84

Line One indicates the start of Group 1. The report code contained within Group 1 (Line 2
to Line 8, inclusive) will only be executed if they cause a value to be printed in the report.

Line Two prints the text "Funds from operations (note 1)" as a main heading.

Line Three prints a description, "Inflows of funds from operations".
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
While … EndWhile statements

Line Four indicates the start of Group 2. The report code contained within Group 2 (Line 5
to Line 7, inclusive) will only be executed if they cause a value to be printed in the report.

Line Five sets the variable "Sales", to equal the total of the movement of the accounts in
the #RevMan to #RevSales account ranges.

Line Six adds to the variable "Sales" the total movement of accounts in the
#StockMovement account range.

Line Seven prints the value contained in the variable "Sales".

Line Eight indicates the end of Group 2.

Line Nine indicates the end of Group 1.
Note:
If the "Sales" variable contains a value, then Line Seven of the report would result in a value
being printed. Consequently, all of the report code contained within Group 2 would be executed
by HandiLedger 2016. In addition, as Group 2 is contained within Group 1, all of the report
code within Group 1 would also be executed.
If the "Sales" variable did not contain a value, then Group 2 would not result in a value being
printed in the report. Consequently, the report code contained within Group 2, and also Group1,
would not be executed. This would mean that the "Funds from operations…" heading, and the
"Inflows of funds…" description would not be printed in the report.
While … EndWhile statements
The While … EndWhile statement is used to execute a section of report code a number of times
until a specified condition is no longer met.
Syntax
While condition
{various lines of report code}
EndWhile
Where:

Condition - The criteria that must be met before the report code within the While…EndWhile
statement are executed. Often the condition that you write will include operators. An
operator allows you to perform a mathematical evaluation (e.g. x<=10 checks to see if
variable x is less than or equal to 10).
Refer to the Appendix for a list of available operators.
Note
The statement will execute until a specified condition is no longer met. Generally, it will execute
until a variable equals a certain value. Consequently, the code within the While … End While
statement generally increments a variable each time the code is executed. Refer to Example
Two, below.
Example One
Imagine that you want to print all member/partner/beneficiary names for the selected entity.
The following report code would do that:
AddText (GetMemberName(1))
AddText (GetMemberName(2))
AddText (GetMemberName(3))
There is a problem with the above code … It will only print the names of the first three
members/partners/beneficiaries names. What happens if the entity has 100 members? If you
had a line of code in the report for each of the members, the report would be very long.
© Sage Software Australia Pty Ltd
85
Chapter 6. Statements
Flexible Report Writer 2016
Instead of printing the names in the above manner, it would be much more efficient to use a
While … EndWhile statement to loop (repeat) the required lines of code. This then enables you
to write a report that caters for a varying number of members. In addition, the code potentially
takes up fewer lines in the report. Example Two (below) illustrates this.
Example Two
The following report code would prints the name of each member, partner, or beneficiary.
HandiLedger 2016 would have assigned the first member, partner, or beneficiary sub-account
number 1. In order to print information on each member, partner, or beneficiary, the report code
must use a variable to calculate the relevant sub-account number.
In the following report code, variable "x" represents the sub-account number.
x=1
While x<= MaxSubAccount
AddText (GetMemberName(x))
x=x+1
EndWhile
The report code does the following:

Line One sets variable "x" to equal one.

Line Two compares variable "x" to the maximum sub-account number.
Where "x" is less than or equal to the maximum sub-account number, the report codes
contained within the While … End While statement (Lines three and four) will be executed.
Where "x" is greater than the maximum sub-account number, none of the code in the
While…EndWhile statement is executed, and HandiLedger 2016 skips directly to Line Five.

Line Three prints the member's name in the report.

Line Four increases the value of "x" by one (remember, "x" is representing the sub-account
number), and then HandiLedger 2016 loops back to Line Two. This looping will continue
until the While condition is failed.

Line Five indicates the end of the While…EndWhile loop.
Variable "x" is set to equal one before the HandiLedger 2016 gets to the While statement in the
report file. When HandiLedger 2016 gets to the While statement, it checks to see if the
condition has been met (it checks to see if x is less than or equal to the maximum sub-account
number). If the condition is met, the code within the statement executes. This code includes
the line x=x+1, which increases the value of the variable x by one. The HandiLedger 2016 will
keep repeating the report code from While to EndWhile until the condition is no longer met (in
this case, until x exceeds the highest sub-account number).
86
© Sage Software Australia Pty Ltd
Chapter 7. Notes to the Financial
Statements
In the following sections, we will clarify how to use the Notes to the Financial Statements within
the Flexible Report Writer.
Numbering of the Notes
Before you consider how the Flexible Report Writer works in relation to the Notes to the
Financial Statements, it is important that you understand how HandiLedger 2016 decides the
number to print against each note.
Significance of the “Notes to the Financial Statements” window
When you prepare the Notes to the Financial Statements, you want the notes to have
sequential numbers. HandiLedger 2016 assigns sequential numbers to each Note that you
select in the “Notes to the Financial Statements” window. (Generally, you would not select all of
the available Notes, as not all Notes are relevant to your client).
Please refer to Example 1 and Example 2 (below).
Example 1
Figure 7: The Notes to be included are selected in the “Notes to the Financial Statements” window
A number of notes have been selected in the above Figure. The client's Notes to the Financial
Statements would appear similar to:
Note 1:
Note 2:
Note 3:
Note 4:
Statement of Accounting Policies
Revenue
Profit from Ordinary Activities
Cash assets
© Sage Software Australia Pty Ltd
87
Chapter 7. Notes to the Financial Statements
Note 5:
Note 6:
Note 7:
Note 8:
Note 9:
Flexible Report Writer 2016
Receivables
Inventories
Payables
Interest-Bearing Liabilities
Provisions
Example 2
Consider what would happen if the Receivables Note in Example 1 was selected in the “Notes
to the Financial Statements” window, but the client did not have any Receivables.
Even if the note is selected in the “Notes to the Financial Statements” window, because it is
blank, HandiLedger 2016 will not assign a number to it or print it. The result is displayed below.
Note 1:
Note 2:
Note 3:
Note 4:
Note 5:
Note 6:
Note 7:
Note 8:
Statement of Accounting Policies
Revenue
Profit from Ordinary Activities
Cash assets
Inventories
Payables
Interest-Bearing Liabilities
Provisions
Notes and the Flexible Report Writer
The note number that prints against a specific Note in the Notes to the Financial Statements will
vary. This is because (a) the specific Notes included in the Notes to the Financial Statements
will differ between each entity, (b) HandiLedger 2016 always numbers the notes in consecutive
order.
For example, the Inventories note may print in the Financial Statements as "Note 10:
Inventories" for one entity, and then for another entity it may appear as "Note 8: Inventories".
Given this, how does HandiLedger 2016 keep track of each Note? HandiLedger 2016
associates three numbers with each Note: a Print Number, a Registered Number, and an
Ordering Number.
How HandiLedger keeps track of each Note
HandiLedger 2016 keeps track of each Note using the Note's Registered Number, and its
Ordering Number (defined below). Effectively there are three numbers associated with each
Note:

Print Number – The physical note number to print in the Notes to the Financial Statements.

Registered Number - A unique number assigned to each Note. The Registered Number is
stored in the HandiLedger 2016 program, and cannot be changed. HandiLedger 2016
identifies each note using the Registered Number.

Ordering Number – Dictates the order in which HandiLedger 2016 prints each note. The
Ordering Number is stored in the HandiLedger 2016 program, and should be adhered to.
Why are both a Registered Number and an Ordering Number used?
Both a Registered Number and an Ordering Number are required because Sage Software
Australia's programmers may add new Notes into HandiLedger 2016. This would happen when
an Accounting Standard required an additional note.
Remember that the Registered Number of the existing Notes cannot be changed. Whenever
Sage Software Australia's programmers add a new note into HandiLedger 2016, they must
assign the next available Registered Number to the Note. If HandiLedger 2016 only printed the
Notes in the sequence of the Registered Number, any new note would print last, which may not
be the correct place to display the note.
88
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Notes and the Flexible Report Writer
Consequently, the Flexible Report Writer uses both the Registered Number and Ordering
Number. This enables the notes to display in the correct order.
Please refer to the following example.
Example
Consider the Extraordinary Items note. This Note has a:

Registered Number of 26

Ordering Number of 5
The start of the Flexible Report Writer report code that causes the Extraordinary Items Note to
print reads as follows:
If (Note26) then
GroupStart ()
AddMainHeading ("Note 5: Extraordinary Items")
{other lines of report code}
GroupEnd ()
EndIf
Notice that the report code refers to both the Registered Number (i.e. "Note26" in the first line),
and the Ordering Number (i.e. "Note 5" in the third line of the report).
The report code works as follows:

Line one of the report code checks to see if you have selected the Extraordinary Items
Note in the "Notes to Account Details" window. If you have, then the If statement's
condition has been met, and HandiLedger 2016 will attempt to execute the report code
contained within the If statement.

Line two indicates the start of a Group. The report code within the Group will only be
executed if it would result in a value being printed.

Line three prints a heading for the note. The text that is printed is determined by the
section of code:
("Note 5: Extraordinary Items")

Line four indicates the end of a Group.

Line five indicates the end of an If statement.
Registered numbers and Ordering numbers
The Registered Numbers and Ordering Numbers for the various entity types are listed below.

Registered Numbers – companies, partnerships, trusts, sole traders.

Registered Numbers – superannuation funds.
Note: The Registered Numbers and Ordering Numbers used by Superannuation funds differ
from those used by all other entity types.
© Sage Software Australia Pty Ltd
89
Chapter 7. Notes to the Financial Statements
Flexible Report Writer 2016
Notes - Company, Partnership, Trust, Sole Trader
90
Note Description
Registered
Number
Ordering
Number
Statement of Significant Accounting
Policies
Revenue
Profit from Ordinary Activities
Income Tax
Extraordinary Items
Reserves
Dividends
Cash Assets
Receivables
Inventories
Other Financial Assets
Tax Assets
Other Assets
Property, Plant and Equipment
Investment Property
Intangible Assets
Payables
Interest-Bearing Liabilities
Tax Liabilities
Provisions
Other Liabilities
Contributed Capital / Owners Equity /
Trust Capital
Remuneration and Retirement Benefits
Superannuation Commitments
Auditors' Remuneration
Contingent Liabilities
Capital and Leasing Commitments
Related Parties
Events Subsequent to Reporting Date
Financing Arrangements
Ultimate Parent Entity
Segment Information
Controlled Entities
Outside Equity Interests in Controlled
Entities
Economic Dependency
Effect of Changes in Accounting Policy
Debt Defeasance
Cross Guarantees
Put and Call Options
Trust Liabilities and Right of Indemnity
1
1
2
3
4
26
18
6
5
7
8
10
37
9
11
40
12
13
14
38
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
19
20
21
22
23
24
25
27
28
29
30
31
23
24
25
26
27
28
29
30
31
32
33
34
32
33
34
35
36
39
35
36
37
38
39
40
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Notes and the Flexible Report Writer
Notes - Superannuation funds
Note Description
Registered
Number
Ordering
Number
Statement of Significant
Accounting Policies
Investment Revenue
Other Revenue
Movement in Net Market Value
General Administration Expenses
Income Tax Expense
Liability for Accrued Benefits
Vested Benefits
Guaranteed Benefits
Forfeited Benefits
Related Party Transactions
Funding Arrangements
Cashflow Information
Financial Instruments
1
1
2
3
4
5
6
7
9
10
11
12
13
14
15
2
3
4
5
6
7
9
10
11
12
13
14
15
© Sage Software Australia Pty Ltd
91
Appendix
Operators
The following Operators can be used in If … EndIf statements and While … EndWhile
statements.
Operator
Description
=
Assignment
<>
Not Equal
<
Less than
<=
LessOrEqual
>
Greater than
>=
GreaterOrEqual
+
Addition
-
Subtraction
*
Multiplication
/
Division
(
LeftBracket
)
RightBracket
,
Comma
;
SemiColon
And
And
Or
Or
Not
Not
© Sage Software Australia Pty Ltd
93
Glossary of Terms
*account ranges
See aliases.
AccountType
The type of account to apply a function to. The available AccountTypes are:
Cr - Print all account as credits. Where the account has a debit balance, the balance will be
displayed as a negative.
Dr - Print all accounts as debits. Where the account has a credit balance, the balance will be
displayed as a negative.
TB - Prints in trial balance format.
CR_Only - Prints accounts only where the balance is in credit.
DR_Only - Prints accounts only where the balance is in debit.
CR_Key_Only - Prints accounts only where the balance of the key column* is in credit.
DR_Key_Only - Prints accounts only where the balance of the key column* is in debit.
*Key column is defined in the Glossary of Terms.
*aliases
Aliases are used in HandiLedger as a way of referring to a range of account codes. For
example, the #RevAll alias covers the range of accounts from 0001 to 0999. Aliases are used
extensively in the Flexible Report Writer.
To view the list of aliases in HandiLedger, from the Reports menu, click Account Ranges.
Aliases are also referred to as Account Ranges.
*constant
A Constant is a named item that retains a consistent value throughout the execution of a
program, as opposed to a variable, which can have its value changed during execution.
HandiLedger has a number of constants, which you can use in various functions.
For information on the constants used in the Flexible Report Writer, see Chapter 3, "Constants".
*Flexible Report Writer
A tool that allows you to modify and write your own HandiLedger reports.
To access the Flexible Report Writer, from the Reports menu, click Flexible Report Writer.
© Sage Software Australia Pty Ltd
95
Glossary of Terms
Flexible Report Writer 2016
*footer
Information that is printed on the bottom of each page.
*Format Editor
The Format Editor is a HandiLedger tool that enables you to write and modify format files.
To open the Format Editor, from the Reports menu, click Format Editor.
For additional information on format files, see "Format files and report files" in Chapter 1,
"Introduction".
*format file
The format file contains the column layout for HandiLedger reports.
Report files and format files can be mixed and matched. You can use the same format file with
any number of report files to create reports with a unique appearance.
For additional information on format files, see "Format files and report files" in Chapter 1,
"Introduction".
*function
A function is a subroutine that returns a value. You can use a large number of functions when
you create report files using HandiLedger's Flexible Report Writer.
For information on the functions that can be used in the Flexible Report Writer, see Chapter 5,
"Functions".
*header
Information that is printed on the top of each page. In a HandiLedger report, the Header
generally prints the report name and column headings.
key column
The Key Column is defined in the report's format file. It is used to link the description column to
the figures displayed in the report.
Example: Imagine in a Trial Balance the 2008 figures display a profit of $100, and the 2007
figures display a loss of $500. As you are concerned with the 2008 year, you want the words
"Net Profit" to be displayed in the trial balance - not the words "Net Loss". To achieve this, the
2008 column in the format file would need to be specified as the "Key column".
*operator
In mathematics and in programming and computer applications, a symbol or other character
indicating an operation that acts on one or more elements. Examples of mathematical operators
include + and -.
For a list of operators that are accepted by HandiLedger, see the Appendix.
*report file
The report file contains the Flexible Report Writer programming code for HandiLedger reports.
It effectively gives HandiLedger instructions on the financial accounts to examine, and the
mathmatical operations to perform on those accounts. It also holds the header and footer
details, and information on the display of text (eg font size, bolding, underlining).
96
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Glossary
Report files and format files can be mixed and matched. You can use the same format file with
any number of report files to create reports with a unique appearance.
For additional information on report files and format files, see "Format files and report files" in
Chapter 1, "Introduction".
*routine
Any section of report code that can be executed within a program.
*statement
A statement is the smallest executable item within a programming language. HandiLedger has
a number of statements that you can use when you write a report file in the Flexible Report
Writer.
For information on the statements that may be used within the Flexible Report Writer, see
Chapter 6, "Statements".
*subroutine
A common term for routine, likely to be used in reference to shorter, general, frequently called
routines.
*variable
A variable is a named storage location capable of containing data that HandiLedger can modify
during the execution of a report.
For additional information on using variables in the Flexible Report Writer, see Chapter 4,
"Variables"
© Sage Software Australia Pty Ltd
97
C
Index
ClientName 29
comments 23
constants 27–39
credit 73, 75
CreditOnly 75
CurrentEmployeeRate 31
CurrentEmployerContRate 31
CurrentYear 28
!
D
! 23
DatePreviousDividend 28
dates 27–29, 44–45
debit 73, 75
DebitOnly 75
directors 34–36, 79, 81
DirectorsReportDate 28
DirectorsReportPlace 31
DirectorsStatementDate 28
DirectorsStatementPlace 31
Distribute 52, 59, 78
Division 48
A
ABN 30
AccruedBenefitsCurrentYr 30
AccruedBenefitsLastYr 30
Accumulate 46
ACN 30
AddAccounts 50
AddCashAccounts 50
AddClosingBalance 51
AddClosingStock 51
AddColumnText 27–33, 42, 66
AddDescription 66
AddFooter 67
AddHeader 67
AddHeaderText 68
AddImage 69
addition 48–55
AddMainHeading 70
AddMember 52
AddMovement 53
AddOpeningBalance 53
AddOpeningStock 54
AddSubAccounts 54, 77
AddSubHeading 71
AddTabText 27–33, 42, 65
AddText 27–33, 42, 64
AgentName 30
AliasEnd 76
AliasStart 76
AmountPreviousDividend 31
AmountProposedDividend 31
appearance 67–72
AsAt 28
AuditorsAddress 31
AuditorsDescription 31
AuditorsName 29
AuditorsReportDate 28
AuditorsReportPlace 31
AuditorsRepresentative 29
AverageCost 46
B
beneficiaries 34–36, 52, 59, 78, 79, 80
© Sage Software Australia Pty Ltd
E
EmployersName 29
EndIf See If
EndWhile See While
entity details 30–33, 33
F
FirmAddress1 32
FirmAddress2 33
FirmName 30
FirmPartner 30
FirmPostcode 33
Flexible Report Writer 15–16, 16, 19–21, See also
report files
footers 23, 67
Format Editor 15, 17, See also format files
format files 15–19, 25, See also Format Editor
FullDate 45
functions 43–74
G
GetMemberName 79
GetSubDescription 77
GroupEnd() See GroupStart()
GroupStart() 24, 84
H
HasLivestock 34
HasManufacturing 34
HasNotes 34
HasPrimaryProduction 34
HasSubAccounts 74
99
Index
HasTrading 34
headers 23, 67, 68
headings 67, 68, 70, 71
I
If 33, 72–74, 83, 93
images 69
indentation 24
IsAssociation 33
IsAudited 34
IsCompany 33
IsDefinedBenefit 33
IsDefinedContribution 33
IsDormantCompany 33
IsNotZero 72
IsPartnership 33
IsReportingEntity 33
IsSmallProprietary 33
IsSoleTrader 33
IsSuperFund 33
IsTrust 33
IsTrustee 33
K
KeyIsCredit 73
KeyIsDebit 73
Flexible Report Writer 2016
preferred reports 15
PreviousDirectorsReport 28
PrincipalActivity 32
PrintAccounts 55
PrintCashAccounts 56
PrintClosingBalance 57
PrintClosingStock 57
printing 48, 55–64
PrintMember 59
PrintMovement 58
PrintNoteAccount 63
PrintOpeningBalance 58
PrintOpeningStock 59
PrintSubAccounts 60
PrintTotalValue 62
PrintValue 61
PriorTaxRate 32
R
Ratio 48
ratios 48, 76
report files 15–18, See also Flexible Report Writer
RunHSReport 44
RunMyReport 44
S
MaxSubAccount 34, 36
Member 30, 34
members 34–36, 52, 59, 78, 79, 81
Multiplication 47
selecting the function parameters 43
SetRatio 76
SetSubAccount 54, 60, 76
SharePreviousDividend 32
ShareProposedDividend 32
SkipSpace 71
software support 15
statements 24, 33–34, 83–86
stock 34, 37, 46, 51, 54, 57, 59
Stock 37
sub-accounts 36, 54, 60, 74, 76, 77
SubtractDays 45
subtraction 41
N
T
NameJoiner 29
names 29–30
Net 79
NoEmployees 32
notes 63, 87–91
TaxAgentName 30
TaxRate 32
text 27–33, 70, 71
Today 27, 29
TotalBeneficiaries 35, 80
TotalDirectors 35, 81
TotalMembers 35, 81
TotalPartners 35, 80
totals 41, 61, 62, 79
TradingName 29
Trustee1 30
Trustee2 30
TrusteeStatementDate 29
TrusteeStatementPlace 32
L
LastEmployeeRate 31
LastEmployerRate 31
layout 67–72
M
O
operators 93
P
PageBreak 72
PaidUpCapital 32
partners 34–36, 52, 59, 78, 79, 80
ParValue 32
pictures 69
100
© Sage Software Australia Pty Ltd
Flexible Report Writer 2016
Index
V
variables 41–42
W
While 36, 42, 47, 72, 77, 85, 93
windows
Function Parameters 43
Y
YearPreviousDividend 32
Z
Zero 38
© Sage Software Australia Pty Ltd
101