Tally TDL Report Template
TDL, the Tally Definition Language, lets you add reports, fields and menus to Tally Prime without touching the product itself. This generator produces a clean starting file with a menu entry, a collection and a simple report, so you can learn the structure and edit it for your own case.
Fill in
Shown as the report title
Shortcut letter shown in the Gateway of Tally
Menu entry and report
[#Menu: Gateway of Tally]
Add : Key Item : Netray Stock Report : K : Display Collection : NetrayStockColl
[Collection: NetrayStockColl]
Type : Stock Item
Fetch : Name, Parent, ClosingBalance, ClosingValue
Title : "Netray Stock Report"
[Report: NetrayStockCollRpt]
Form : NetrayStockCollFrm
Title : "Netray Stock Report"
[Form: NetrayStockCollFrm]
Parts : NetrayStockCollPart
[Part: NetrayStockCollPart]
Lines : NetrayStockCollTitle, NetrayStockCollLine
Repeat : NetrayStockCollLine : NetrayStockColl
Scroll : Vertical
[Line: NetrayStockCollTitle]
Use : Name Field
Local : Field : Name Field : Set as : "Name"
[Line: NetrayStockCollLine]
Fields : NameFld, ParentFld, BalFld, ValFld
[Field: NameFld]
Use : Name Field
Set as : $Name
[Field: ParentFld]
Use : Name Field
Set as : $Parent
[Field: BalFld]
Use : Number Field
Set as : $ClosingBalance
[Field: ValFld]
Use : Amount Field
Set as : $ClosingValueLoading the file
1. Save the text above as a file with a .tdl extension, for example NetrayStockReport.tdl. 2. In TallyPrime open Help, then TDL and AddOn, and add the file path. 3. Set Load TDL on startup to Yes if it should persist. 4. Open the Gateway of Tally and look for the menu entry named Netray Stock Report.
This is a skeleton to learn from and adapt, not production code. TDL syntax, field names and object attributes vary with the object type chosen and with the Tally Prime release. Test only on a copy of the company, keep a backup, and check the official TDL reference for your version. Tally Solutions documents TDL; this tool is not affiliated with them.
Custom reporting beyond TDL
Describe the report you keep rebuilding and we will say whether TDL, Excel or a private AI reporting layer is the right route.
Optional. The tool and every export work without this. No spam.
How to use the generator
Fill in the report name, the menu key, a collection name without spaces, the object type and the fields to fetch. The code panel updates as you type. Copy it into a text file with a .tdl extension, load it in Tally Prime and open the new menu entry. Change fields and layout in small steps and reload after each change so you can see which edit broke what.
How a TDL report is structured
A TDL report is built from nested definitions. A menu opens a report, a report uses a form, a form has parts, parts have lines, and lines hold fields. A collection supplies the data objects, such as stock items or ledgers, and fields read attributes using the dollar sign, for example the name or closing balance.
- Menu: adds the entry to the Gateway of Tally
- Collection: chooses the object type and fetched attributes
- Report, Form, Part, Line: define the layout
- Field: shows one attribute of each object
Extending the template
Add filters to the collection to show only items below a reorder level or in a chosen group. Add a total field in the part to sum values. Use a second collection to show voucher detail. When an attribute is not available on the object you chose, you need to fetch a related object or compute the value with a function. Read the reference for your Tally Prime release before using unusual attributes.
Common mistakes
Common issues are misspelt definition names, a missing Fetch for an attribute you display, mixing tabs and spaces carelessly, and loading a file that has a syntax error so nothing appears. Another is editing the live company without a backup. Keep each TDL small, name definitions with a prefix of your own, and keep a changelog for every file you deploy to clients.
Frequently Asked Questions
What is TDL in Tally?
TDL stands for Tally Definition Language. It is the language used to define Tally's own screens and reports, and it lets consultants add custom fields, reports, menus and validations without changing the core product.
How do I load a TDL file in Tally Prime?
Save the file with a .tdl extension, open the TDL and AddOn setting from the Help menu, add the file path, and enable loading. Restart or reload the company if the new menu does not appear.
Can TDL change my data?
TDL can add validations and automations, and poorly written code can affect voucher entry. Test on a copy of the company, keep backups, and review any TDL from third parties before using it on live data.
Do I need a developer to write TDL?
Simple reports can be adapted by an accountant who reads the code carefully. Complex customisations are better handled by a TDL developer, since mistakes may be hard to see until month end.
If you are hitting the limits of what TDL can reasonably do, Netray can help you move reporting to a governed layer over your data or to an ERP with a proper reporting engine.
Related Tools
Tally Stock Item Import Template (Excel)
An editable stock item master sheet with HSN, GST rate, unit and opening balance that calculates opening value and exports to Excel.
Country & TaxTally Prime Manufacturing Journal Checklist
A tick-box checklist for setting up bills of material and posting manufacturing journals in Tally Prime without stock or costing surprises.
ERP OperationsTally Data Backup Checklist
A checklist for reliable Tally Prime backups: schedule, offsite copies, restore tests and year-end archives.
ERP Migration & SelectionTally to ERP Migration Readiness Assessment
Answer ten questions to see whether Tally is still enough or whether your operations justify moving to an ERP.
More Developer Tools tools
See all- Tally XML Export Request Generator
- Tally XML Ledger Import Generator
- SAP Sales Order ABAP SELECT Generator (VBAK, VBAP, VBFA)
- SAP Sales Order Create BAPI ABAP Generator (BAPI_SALESORDER_CREATEFROMDAT2)
- SAP ABAP Open Items SELECT Generator
- SAP ACDOCA SQL Query Generator
- SAP QM Inspection Lot ABAP SELECT Generator
- SAP Quality Notification Pareto SQL Query Generator
- SAP QM Usage Decision BAPI Skeleton