TDL for Tally.ERP 9 is a double-edged sword. It is intuitive and powerful for those who know it, but obscure and frustrating for those who don't.
However, the value it delivers is undeniable. It allows Tally to be a generic product off the shelf but a specific solution on the desk. For any business looking to scale their operations in Tally, investing in TDL customization is not just an option—it is a necessity.
Rating: ★★★★☆ (4/5) (Loses half a star for the steep learning curve and proprietary nature; gains full marks for utility and seamless integration).
| Problem | Likely Cause | Fix |
|---------|--------------|-----|
| TDL not loading | Syntax error in first 100 lines | Validate with Tally Developer compiler |
| Report shows blank | Collection Fetch missing required field | Add Name, Parent, etc. |
| Field not editable | Missing Allow Edit : Yes | Add to field definition |
| Multiple TDL conflicts | Same object altered twice | Use #[ObjectName: Mod] for safe alteration |
| Performance slow | Large collection without filter | Use Where : clause in Collection | tdl for tally erp 9
[#Report: Monthly Sales by Group] Form : SalesGroupForm Collection : SalesDataByMonth
[#Collection: SalesDataByMonth] Source Collection : SalesRegister Child Of : VoucherDate, StockGroup Aggregation : Sum(Amount) Compute : MonthName = Format(VoucherDate, "MMMM YYYY")
This report groups sales by stock group per month, which is impossible in standard Tally ERP 9 without TDL. TDL for Tally
If you’re still on Tally ERP 9, note that Tally Prime (the successor) uses a slightly updated version of TDL. Most TDL written for ERP 9 works on Prime, but there are differences:
For this article focused on TDL for Tally ERP 9, stick to the classic syntax, which is still widely used in thousands of businesses.
You can use TDL to export data in a custom JSON/XML format for an external CRM, or import data from an Excel sheet via a TDL-driven import routine. [#Report: Monthly Sales by Group] Form : SalesGroupForm
A typical TDL customization follows this object hierarchy:
To work with TDL, you must understand its basic building blocks:
| Component | Description | Example Usage | | :--- | :--- | :--- | | #Part | Defines a UI block (like a form or section). | Adding a new row to a sales invoice. | | #Field | Defines a single data entry element (text, date, number). | Adding a "Delivery Note No." field. | | #Collection | Fetches data from Tally’s database (like SQL SELECT). | Get all pending sales orders. | | #Report | Defines a custom report structure. | A new "Aging Analysis by Salesman" report. | | #Action | Defines what happens on a button click or key press. | Trigger a custom validation or export. | | #MenuLine | Adds or modifies menu items. | Add "My Tools" on the Gateway of Tally. |
Syntax Note: TDL uses : (colon) for attributes and ## for commands. For example:
[#Field: My Custom Field]
Type : String
Width : 20