TDL - is tally defination language, use for customization of tally software.
Main Point to remember in this language,
1. this is high level and simple strcture ,
Basic Define
in Report ->form-> part-> line->fieldfor eg: [report: my report]
form : hello world
[form : hello world]
part : part1
[part: part1]
line: line1
[line: line1]
field:field1
[field:field1]
set as : 'hello world'
this above example shows hello world
2.
What are defination and attribute
-Definition - report, collection, form, line, part, field, object, variable, border, style, color, import object , import file, key
attribute - within this above defination type set attribute eg : set as , info, item, while declare above defination also act as attribute
eg [part:part1] - --> defination type : defination name
line: line1 ---> attribute type: attribute name --> here line act as attribute
[line:line1]
suppose i want to define border,
[border :sample border]
Top : Thin,Double
Bottom : Thick
Left : Flush
Right : FullLength
color:red
3.
Modify existing things
, suppose change existing menu then use symbol #, [#menu gateway of tall] - this is first line of any tdl file
4.
How to save
this file or what is extension for this file save file as .txt, .tdl, .tcp this extension.
comment using # or ; OR /* */ multiline
5.
CASE
- capital , small dosent matter but declare in case use same case for next refrence eg : Myform then use same case when need this for easy understand6.
browse
use to open file such as image or any file7.
Menu edit
for change sequence of menu availble in tally use below syntax, Add: Item: Before: ~Quit: MyOption: Display: rptMyReport
Add: Item: After:~Quit: MyOption: Display: rptMyReport
Add: Item: At Beginning: MyOption: Display: rptMyReport
Add: Item: At End: MyOption: Display: rptMyReport
8.
set as
: use to set value to field eg: set as: "hello" OR use info : "hello"9.
background
: to set background10.
Symbol
- various symbol use in tally,@ : use to access local formula (locally define within main field or part)
eg :
[field: full name]
firstname: 'abc'
middlename: 'bcd'
lastname: 'efg'
set as: @firstname + @middlename +@lastname
@@ : use to get value of system formula or global formula (globally call, use anywhere)
[system: formula]
amtwidth : 20
[field : reptitleamt]
width:@@amtwidth
[field : reptotalamt]
width : @@amtwidth
# : Gives the value of the field, when # is prefixed to Field name, Modifying existing Definitions using # ie customization
[field: fieldA]
set as : 'abcd part'
[field : fieldB]
set as : #fieldA
[#menu:gateway of tally]
## : used to get the value of global variable
[field : fieldA]
set as : ##ABC
$ : use to access the value of object method
set as :$brokername
$$ : use to call function
IN SHORT -->
A) @ & @@ - for local & system/global formula respectivly
B) $ & $$ - for access the value of object method or udf & call function respectivly
C) # can be used for referencing a field or modifying the existing definition.
## is used for accessing the value from a Local or Global variable.
11.
key
to use shortcut, assign shortcuteg : key : ctrl+L
12.
User define fields(UDF)
-UDFUDFs should be defined under the section [ System: UDF ].
The attribute ‘Storage’ in a Field definition is used to store the value entered in a Field.
The value is stored in the context of the current Object.
A Simple UDF can store one or more values of a single data type only.
Aggregate UDFs are very useful for storing multiple values and repeated values
to store and retrive in tally database must define as UDF
step -1)
[System: UDF]
MyUDF : String : 20001 ; this may be Aggregate, string, number,amount, logical,date,Rate of Exchange
- in this Aggregate can be use to define diffrent type of data in one entity,multiple values and repeated values
step -2)
[Field: NewField]
Use : NameField
Storage : MyUDF
step -3)retrive
[Field: MyField]
Use : Namefield
Set as : $MyUDF
13.
Include
: include [Dimensions.txt] to include other file to current file14. use
msg box
: to display message , query box - display confirmation box yes/no15.
Similar words
field or fields are same, similarly line or lines, part or parts16.
Optional Definition
[!field: fldfirst] - optional definition using ! symbol17.
action
: display,executive, create, alter,print,menu,form accept, line down, field down etc are action in tdl18.
the operator
= is comparison opearator , in tdl has no assignment operator19.
skip
- use for prevent alter field - i.e. field value not change by userskip forward to direct go one next field, skip one field from edit
20.
info
- is attribute a combination of both set as and skip21.
use
- is keyword use in defination reuse to existing definition like style use22.
add
- use to attributeeg: add : button : changeitem
23.
option
- use for conditional resulteg: [field: fldmain]
option: fldfirst: condition1
option:fldsecond:condition2
using prefix above code is
[!field:fldfirst]
set as : 'hello'
[!field:fldsecond]
24.
Continuation Line
+ is line continuation character* reinitialize defination
! create optional defination
_ to expose method to ODBC
25.
Inactive
- to loss content in field , but size remains, in case button is used but remain inactive.if any query related to tdl, i am here to help you, please comment your query.
For more details comment here or read developer reference
Good blog, i like this blog
ReplyDelete