Tally ERP 9 | Tally 9 | Tally 8.1 | Tally 7.2 | Tally 6.3 | Learn Tally TDL

Saturday, February 10, 2007

TDL basics - An overview

Tally Definition is a proprietory language of "Tally Solutions FZ LLC". It is used to customize the Tally sofware.

TDL is not a full-fledged programming language, but it is a Definition's language. It has its own pros and cons. Using TDL, you can add new menu-options, new reports, new entry screens in Tally 7.2 or Tally 9. However, the programmer does not have any control over the event-driven functionality of Tally.

TDL Basics - An Overview

1. Names are neither case-sensitive nor space-sensitive.
[Report: MyReport] is the same as [Report: MYREPORT]
[Report: My Trial Balance] is the same as [Report: MyTrialBalance]

2. Names should not start with numerals.

3. Comments in TDL are written using double semi-colon (i.e. ;;)

4. A TDL program comprises of TDL statements / definitions and can be written using any text editor (example:- Notepad)

5. To compile TDL program, you require Tally Developer which can be purchased from Tally Solutions or any Tally authorised Dealer. [If you don't have Tally Developer, you may send your TDL programs to mailto:tdlplayground@rtslink.com.

6.All reports in Tally Accounting software have been created using TDL.

7.You can modify existing Menu's in Tally and add your own menu-options. Example:-
[#Menu: Gateway of Tally]
Add: Item: My Reports: Display: rptMyReport

The above code modifies the "Gateway of Tally" menu, and adds a new menu-option "My Reports". When the user clicks on "My Reports" menu-option, it display a report named "rptMyReport". The "#" symbol is used to modify existing definitions.

8.Normally, forms are used in programming languages like VB, VFP, Delphi etc to display text and accept user input. In TDL, you have to use the Report definition which uses the following:-
Report uses Form
Form uses Parts
Part uses lines
Line uses Fields
Field is the real-container where text is displayed.

Remarks:- ratta laga le bhai. Isme samajne jaissa kuch bhi nahi hai.

9.Actions are used to implement/activate the definitions. Example, Display action is used below.
[#Menu: Gatway of Tally]
Add: Item: My Reports: Display: rptMyReport

10. Attributes are like properties. Example, Width and Style
[Field: My Field]
Width: 30
Style: Normal Bold

11. Dimensions in TDL can be expressed in different ways
.
[Form: My Form]
;; This specifies the dimension of the form in centimeters
Width: 15 cms
Height: 25 cms

[Form: My Form]
;; This specifies the dimension of the form in Inches
Width: 2 Inches
Height: 2 Inches

[Form: My Form]
;; This specifies the dimension of the form in screen percentage
Width: 15% screen
Height: 25% screen

12. Some of the important attributes that we shall be using with different Definitions are:-

Width: 30% screen
Height: 30% screen
BackGround: Yellow
Invisible: No
Inactive: No
Set as: "Welcome to TDL"
Space Top: 2
Space bottom: 2
Space Left: 2
Space Right: 2

The above attributes are to be used with their appropriate Definitions only.

13. Button is an attribute of Menu and Form definition and is used to intiate actions.

[Button: My Button]
Title: "My Balance Sheet"
Key: F4
Action: Display: Balance sheet

[#Menu: Gateway of Tally]
Button: My Button

The above code is used to display button "My Balance Sheet" in the "Gateway of Tally" menu. It is invoked by pressing F4 function key.

14.Optional defintions
A TDL program mainly comprisely of definitions and actions. Actions are performed on Definitions to implement/activate them.

TDL allows you to use Optional definitions. In simple words, Optional definition is a definition that is activated/executed if specified condition evaluates to be true. Example:-

;;This is an a regular Form definition
[Form: My Form]
Width: 10% screen
Height: 10% screen
Option: TestForm1: #myVariable

;;This is an optional definition
[!Form TestForm1]
Width: 30% screen
Height: 30% screen

Notes:
a) If the value of variable "myVariable" evaluates to be true, then the optional definition "TestForm1" becomes part of the original definition "My Form".
b) In other words, the original definiton is over-ridden by the Optional definition .

FINAL WORDS
Please send in your views/comments to mailto:tdlplayground@rtslink.com. Please mention whether you found this article to be useful or not. Your valuable suggestions are solicited.

From
Shweta Computers Team

Tally; Tally Developer and Tally Definition Language are trademarks or registered trademarks of "Tally Solutions FZ LLC", Bangalore.