Transcription of TDL Reference Manual - Tally Solutions
1 TDL Reference Manual The information contained in this document represents the current view of Tally Solutions Pvt. Ltd., ( Tally in short) on the topics discussed as of the date of publication. Because Tally must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Tally , and Tally cannot guarantee the accuracy of any information presented after the date of document is for informational purposes only. Tally MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in, or introduced into a retrieval system, or transmitted in any form, by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Tally Solutions Pvt.
2 May have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written licence agreement from Tally , the furnishing of this document does not give you any licence to these patents, trademarks, copyrights, or other intellectual property. 2012 Tally Solutions Pvt. Ltd. All rights , Tally 9, Tally9, , 9, Shoper, Shoper 9, Shoper POS, Shoper HO, Shoper 9 POS, Shoper 9 HO, TallyDeveloper, Tally Developer, 9, , Tally Development Environment, Tally Extender, Tally Integrator, Tally Integrated Network, Tally Service Partner, TallyAcademy & Power of Simplicity are either registered trademarks or trademarks of Tally Solutions Pvt. Ltd. in India and/or other countries. All other trademarks are properties of their respective r s i o n: TDL Reference 2012 PrefaceTally Definition Language (TDL) is the development of 9.
3 This allows the programmers to develop and deploy faster, effective Tally Extensions with book, TDL Reference Manual , divided into two sections. First section begins with the Introduction to TDL and focuses on basic concepts of TDL , TDL Components, Symbols used in TDL, Dimensions and Formatting, Usage of Variables, Buttons and Keys. Thereafter the emphasis is on the coverage of core concepts of Objects, Methods and Collections, Actions and UDF creation. After gaining a reasonable amount of depth and confidence in understanding the above, the focus of the book progresses towards the application of all covered topics , the creation of various types of Reports, Printing and Voucher/Invoice section devoted to a detailed discussion of TDL language enhancements for 9. This section describes the new features, Writing Remote Compliant TDL Reports and User Defined Functions respectively.
4 The What s new section gives an insight about the enhancements in the latest 9 book is for anyone who wants to explore TDL as a development language of Tally and how to write TDL programs effectively. Absolutely no previous TDL experience is necessary. Even advanced users will find this book useful, as the changes to TDL are dealt from the developers and the user's point of will enjoy reading this book, as it is rich in programming folks! iContentsSection I.
5 TDL The Development Language of 9 1. Tally Definition Language An Introduction .. Tally Definition Language .. Comparison with other Languages .. The TDL Program - At a Glance .. TDL Capabilities .. TDL Features .. 72. TDL Components .. Writing a Basic TDL Program .. Specification of TDL Files .. TDL Interfaces .. Hello TDL Program .. Executing Multiple Files using Include Definition .. TDL Components .. Definitions .. Attributes .. Modifiers .. Actions in TDL .. Data Types .. Operators in TDL .. Special Symbols .. Functions .. 293. Symbols and Prefixes .. Access Specifiers/Symbol Prefixes .. General Symbols .. The Usage of @ and @@ .. Formula .. The Usage of # and ## .. Referencing a Field using # .. Modifying existing Definitions using # .. Accessing value from a Variable using ##.
6 The Usage of $ and $$ .. Accessing a Method using $ .. Calling an Internal Function using $$ .. Commenting a Code using ;, ;; and /**/ .. Line Continuation Character (+) .. Exposing Methods and Creating Procedures (_) .. Reinitialize Definitions (*) .. Optional Definitions (!) .. 374. Dimensions and Formatting .. Unit of Measurement .. Dimensional Attributes .. Sizing/Size Attributes .. Spacing/Position Attributes .. Alignment Attributes .. Top Parts, Bottom Parts, Left Parts and Right Parts .. Top Lines and Bottom Lines .. Left Field and Right Field .. Align .. Some Specific Attributes .. Inactive .. Invisible .. Widespaced .. Definitions and Attributes for Formatting .. Border .. Style .. Color .. Background and Print BG Attribute .. Format Attribute .. 555. Variables, Buttons and Keys.
7 Attributes of a Variable .. Type .. Default .. Persistent .. Volatile .. Repeat .. The Scope of a Variable .. Local .. Global .. Field Acting as a Variable .. Modifying the Variable Value .. Example - Variables .. Buttons and Keys .. Attributes of Buttons/ Keys .. 636. Objects and Collections .. Objects .. Tally Object Structure .. Tally Objects Types .. Object Context .. 70 Contents iii Collections .. Simple and Compound Collections .. Sources of Collection .. Creating a Collection .. Object Association .. Report Level Object association .. Part Level Object Association .. Line Level Object Association.
8 Field Level Object Association .. Methods .. Internal Methods .. User Defined/External Methods .. Accessing Method .. Collection Capabilities .. Basic Capabilities .. Advanced Capabilities .. 927. Actions in TDL .. Categories of Action .. Action Association .. Action Association at Menu Definition .. Action Association at Button/Key Definition .. Action Association at Field Definition .. Components of Actions .. Global Actions .. Action Menu .. Action Create and Alter .. Action Modify Object .. Action Browse URL .. Actions Create Collection, Display Collection and Alter Collection .. Action Create Collection .. Action Display Collection .. Action Alter Collection .. Collection Attributes .. Object Specific Actions .. Menu Actions Menu Up, Menu Down, Menu Reject.
9 Form Actions Form Accept, Form Reject, Form End .. Part Actions Part Home, Part End, Part Pg Up .. Line Actions Explode, Display Object, Alter Object .. Field Actions Field Copy, Field Paste, Field Erase, Calculator .. 1168. User Defined Fields .. What is UDF? .. Creating a UDF .. To store the User Input in the UDF .. To retrieve the value of UDF from an Object .. Classification of UDF s .. Simple UDF .. Aggregate UDF .. 1239. Reports, Printing and Validation Controls .. Reports .. Tabular Reports .. Hierarchical Report (Drill down Report) .. Column Based Reports .. Auto-Column Reports .. Automatic Auto-Column Reports .. Columnar Report .. Printing .. Printing Techniques .. Page Breaks .. Frequently Used Attributes and Functions .. Validation and Controls ..15510.
10 Voucher and Invoice Customisation .. Classification of Vouchers .. Accounting Vouchers .. Inventory Vouchers .. Accounting-cum-Inventory Vouchers .. The Structure of a Voucher Object .. Customisation .. Voucher Customisation .. Invoice Customisation .. 173 Section II. TDL Language Enhancements 11. General and Collection Enhancements .. Attributes and Modifier Enhancements .. New Attributes .. Behavioral Changes of Attributes .. The Attribute Child Of to support Voucher Type .. Attribute Modifiers .. A New Attribute Modifier Switch .. Behavioral Changes for Attribute Modifiers .. Behavioral change in System Definitions .. Partial Attribute Support .. Enhanced Special Symbols .. 194 Contents v Multi line commenting in TDL source code using /* and */.