|
Reporting Functions 
Report functions are used to perform calculations
on reports and other special tasks.
Functions supported by CAPITAL GL Controller
include:
|
@Add()
|
Add an account balance, a numeric value or a
report variable to another account balance, numeric value or report
variable.
|
|
@Subtract()
|
Subtract an account balance, a numeric value or a
report variable from another account balance, numeric value or
report variable.
|
|
@Divide()
|
Divide the first account balance, numeric value
or a report variable into another account balance, numeric value or
report variable.
Division by zero will print an error on the
report.
|
|
@Proportion()
|
Based on the first value, show the second value
as a percentage proportion of the first value. This function is
useful when you wish to display percentage increases or decreases
of periods across months or years.
|
|
@Multiply()
|
Multiply the first account balance, numeric value
or a report variable into another account balance, numeric value or
report variable.
|
|
@Officelink()
|
Format the financial statement into columns for
export into the Microsoft Excel spreadsheet.
|
|
@Percent()
|
Display the result of the first value as a
percentage of the second.
|
|
@Request()
|
Force new page if specified number of lines are
unavailable.
|
Using Functions
Examples will help illustrate the use of these
functions:
@Add(10,10)
@Subtract([period_amt:10000],
[period_amt-1:10000])
@Multiply([period_amt:10000], 2)
The first function, @Add(), adds 10 to 10. The result printed on
the report is 20. The second function, @Subtract(), looks up the period activity
for account 10000, then subtracts this from the period activity of
10000 for the prior period. This is why the '-1' code is placed in
the instruction[period_amt-1:10000].
Note also that round brackets are used to
surround the values to calculate, and each value is separated by a
comma. The format of a function is:
@Function(value1,
value2)
Where value1 in most cases can be an account
reference surround by square brackets [ ], a number, or a report
variable. Exceptions are discussed below. Report variables are
discussed in the next section.
The third function, @Multiply([period_amt:10000],
2) multiplies the period activity for account 10000
by 2.
@Percent()
In the function @Percent() the first value specified is
the percentage portion of the second value specified. For example,
the instruction @Percent(50,100)would
print 50 since 50 is 50 percent of 100. Likewise, the instruction
@Percent(20,200)would
print 10, since 20 is 10 percent of 200.
@Request()
The function @Request()only accepts
one value. This is the number of lines that must still be available
on the report before printing of the section to follow will
commence. This is useful if you want to ensure that a particular
section, such as a series of sub-totals plus a total, end up on the
same page.
For example, when the function @Request(6)is found
inside a report, CAPITAL determines if six lines on the current
page (not counting the #footer section or bottom margin) is still
available. If this is so, nothing is done. If this is not the case,
CAPITAL ejects the current page and positions the printer to start
at the top of the next page.
The Request()
function has no effect when exporting financial statements to
Excel.
@OfficeLink()
The @OfficeLink() function is used to assist in
formatting financial statements when exported to Excel. Without
using the @OfficeLink() function
the contents of financial statements are exported to Excel in a
single column. This makes financial statements exported to Excel
difficult to work with.
The syntax of the @OfficeLink() function is:
@OfficeLink(L|Rn,
...)
The first parameter or value of the function
should begin with either an 'L' or 'R' code followed by the width
of the Excel column, to designate the justification. If not
specified, 'L' (left-justification) is assumed. Up to an additional
24 columns may be specified, by separating additional parameters
with a comma. The following instruction formats the output of the
financial statement into two Excel columns. The first is 40
characters wide and left justified. The second is 30 characters
wide and right justified:
@OfficeLink(L40,
R30)
A financial statement exported to Excel may have
a maximum of 25 columns. The @OfficeLink() function should be placed in
the body section of the report and may appear in more than once
place within the report, if you need to vary the formatting of the
data within the financial statement, in order to produce a
consistent result for Excel.
If no parameters are specified, all data is
placed in the first column of the spreadsheet.
While the @OfficeLink() function can be included in a
report multiple times, you may only define the left or right
justification of a column once. Once a column has been defined as
left justified, for example, it will always be formatted as left
justified, even if subsequent @OfficeLink() commands specify right
justification.
You cannot specify a column width wider than 999
characters and less than 6 characters in width. Regardless of the
width of the column you specify, a spreadsheet column will be no
larger than the largest data element found in any column of the
spreadsheet.
_______________________
Related
Topics:
The Report Writer/Editor
|