Reports
In Tally.ERP 9, financial statements are generated as Reports, based on the
vouchers entered till date. Balance Sheet, Profit & Loss A/c, Trial Balance, etc.,
are some default Reports in Tally.
Normally, a business requires Reports in any of the following formats:
● Tabular Report: A Report with fixed number columns, which can be
configured.
● Hierarchical Report: A Report designed in successive levels or layers.
● Column-Based Reports: A Report with multiple columns. Tally.ERP 9
caters to generating all these types of Reports. Tabular Reports
They have the simplest format of all the Report formats. A typical Tabular
report has the following components:
● Report Title: It contains the Name of the Report, the Title for each
column, the Day/Period for which a Report is generated, etc.
● Report Details: It contains the actual information.
● Report Total: It contains the Total of the respective columns.
A typical Tabular Report has a fixed number of columns and is interactive, i.e.,
an end user can change its appearance. Day Book, Stock Summary, Trial
Balance, Group Summary, etc., are some default Tabular Reports in Tally. The
Tabular Report ‘Stock Summary’ is shown in Fig. 9.1
Designing a Tabular Report
A typical Tabular Report will have a Title Line, a Details Line, and an optional
Total Line. The Details Line will be repeated over the objects of a Collection. A
Tabular Report can be made Interactive by adding the following features:
● Adding Buttons to change the period, to change the contents of the
Report, etc. (As discussed in lesson 5: Variables, Buttons, Keys).
● Adding explosions to the lines.
Displaying the Exploded Part
Tally.ERP 9 allows the user to display additional information about the current
line object, when the key combination SHIFT + Enter is pressed. This
functionality is called as ‘explosion’ in Tally. Line attributes Explode and
Indent, and the function $$KeyExplode, are used for the same.
Attribute - Explode
The attribute ‘Explode’ refers to an attribute of the line, which is used to take
the current data from the Line Object. A Part is displayed after the process of
explosion is complete.
Syntax
Explode : <Part Name> : <Logical Condition>
Where,
< Part Name > is the name of the Part which displays additional information
about the Line object.
< Condition > if True, will result in an explosion.
Function - $$KeyExplode
$$KeyExplode function gives the current status of the keys Shift and Enter.
This is used as a condition to check if the user has pressed the Shift+Enter
Key combination.
Example 1: Sim p le T abular Report
Let us consider writing a simple Trial Balance.
[Part : My TB Part]
Lines : My TB Title, My TB Details
Repeat : My TB Details : My TB Groups
Scroll : Vertical
Example 2: A Simple Interactive Tabular Report
A report showing all the Primary groups can be created and exploded by
pressing Shift + Enter to view the sub groups. The ledgers can subsequently
be viewed on the same screen with an indent for each level.The report is as
shown in Figure 9.3
The following code snippet displays the exploded part:
[Line : My TB Details]
Fields : My TB Name Field, My TB ParName Field
Right Fields : My TB Dr Amt Field, My TB Cr Amt Field
Explode : My TB Group Explosion : $$IsGroup and $$KeyExplode
[Field : My TB Name Field]
Use : Name Field
Set as : $Name
Variable : MyGroupName1
Figure 9.3 Simple Interactive Tabular Report. The code for the exploded part is
as follows:
[Part : My TB Group Explosion]
Lines : My TB Details Explosion
Repeat : My TB Details Explosion : My TB GroupsLedgers
Scroll : Vertical
[Line : My TB Details Explosion]
Fields : My TB Name Field, My TB ParName Field
Right Fields : My TB Dr Amt Field, My TB Cr Amt Field
Explode : My TB Group Explosion : $$IsGroup and $$KeyExplode
Indent : 2 * $$ExplodeLevel
Local : Field : Default : Delete : Border
The Collection My TB GroupLedgers is a union of collections of Type ‘Group’
and ‘Ledger’, respectively.
[Collection : My TB GroupsLedgers]
Collection : My TB Groups, My TB Ledgers
The Variable MygroupName1 is used in Child Of attribute, under the
collections ‘ My TB Groups ’ and ‘ My TB Ledgers ’.
[Collection : My TB Groups]
Type : Group
Child Of : #MyGroupName1
[Collection : My TB Ledgers]
Type : Ledger
Child Of : #MyGroupName1
When the user presses the Shift + Enter keys, then the exploded part shows
the Sub-groups under the group in the current line, as shown in Figure 9.4.
When the keys Shift + Enter are pressed by the user, one more exploded part
shows the Ledgers under the current Sub-group, as shown in Figure 9.5.
Hierarchical Report (Drill down Report)
A Tally application provides a simple way of navigating from one report to
another, which is commonly referred to as a drill down. A Drill Down facility
moves from one report to the other to give a detailed view based on the
selection in the current report. A user can return to the first Report from the
detailed view. A typical drill down in Tally.ERP 9 starts from the Report and
reaches the Voucher Alteration screen.
Designing Hierarchical Reports
Hierarchical Reports can be designed by incorporating the following changes to
a Tabular Report:
● Variable attribute of Report definition
● Child Of attribute of Collection definition
● Display and Variable attributes of Field definitions
● Variable Definition
Example
The following code snippet demonstrates the Drill down action, which is based
on the Group Name displayed in the field. The Drill down action is achieved by
specifying the two attributes ‘Variable’ and ‘Display’ at the field level.
[Field : My T B Name]
Width : 120 mms
Set as : $Name
Variable : GroupVar
Display : My Trial Balance : $$IsGroup
A Variable is defined as ‘Volatile’ and is associated at Report. The attribute
‘Variable’ of Report definition is used to associate the Variable with the report.
[Variable : Group Var]
Type : String
Default : ""
Volatile : Yes
[Report : My Trial Balance]
Form : My Trial Balance
Variable : GroupVar
The same Variable is used in the ‘Childof’ attribute of the ‘Collection’ definition.
When a line is repeated over this collection in the report; when the user
presses the Enter key, the Report being displayed will have the objects whose
Parent Name is stored in the variable.
[Collection : My Collection]
Type : Group
Child of : ## GroupVar
The following screen is displayed when the user selects the option from the
Menu:
When the key Enter is pressed by the user, the next screen displays the Sub
Groups of the current Group as shown in Figure 9.7
Column Based Reports
The reports in which the number of columns added or deleted as per the user
inputs are referred to as column-based reports. There are four types of
column-based reports in Tally, namely Multi-Column Reports, Auto-Column
Reports, Automatic Auto-Column Reports and Columnar Reports. All these
types are explained with examples in this section.
Multi-Column Reports
In Multi-Column reports, a column is repeated based on the criteria specified
by user. Trial Balance, Balance Sheet, Stock Summary, etc., are some default
Reports in Tally.ERP 9 having Multi column feature. Normally, this feature is
used to compare values across different periods.
Designing a Multi Column Report
In a Tabular Report, Lines are repeated over a collection. But in a multi-
column Report, columns are repeated in addition to the repetition of the Lines
over a Collection. Based on the user input, columns are repeated. The column
Report is used to capture user inputs like Period, Company Name, Stock
Valuation, etc., based on which columns are generated.
Following attributes are used at various components of a Report to incorporate
the multi-column feature:
Attribute - Column Report
Attribute ‘Column Report’ of the ‘Report’ definition, facilitates the creation of
multi-column reports.
Syntax
ColumnReport : <Report Name>
Where,
< Report Name > is the name of the report used to obtain user inputs from
the options displayed.
Attribute - Repeat
Attribute ‘Column Report’ is associated with a variable, which in turn is
specified in ‘Repeat’ attribute of ‘Report’ definition. Both attributes are
specified in ‘Report’ definition to create a multi-column report.
Syntax
Repeat : Variable