Download Free Tools for Tally ERP
FREE utilities for Tally Accounting Software

Wednesday, July 4, 2007

Exporting a user-defined Report

This post illustrates how to create a Report and Export it.

TDL32 displays a menu-option "Export Report" in the "Gateway of Tally ". On selecting this option it displays Vouchers details like Date, Ledger; VoucherType etc. You can now EXPORT this Report by pressing ALT+E key.

Download TDL32
;; PRODUCT: TDL32.TXT
;; PRODUCT-ID: dr334cfa-2r7f-3f7a-51h3-a3r54a994e6w
;; AUTHOR: Shweta Computers
;;=========================================================================

;;Add a new menu-item to the Gateway of Tally
[#Menu: Gateway of Tally]
Item: Report Export: Display: My Report

[Report: My Report]
Form : My Form

;;Export the Report
Export : Yes

[Form: My Form]

;;Displays the Export button. Use Alt+E to Export the Report.
Button: ExportButton

Part: My Part
Full Width: Yes
Full Height: Yes
XMLTag: ENVELOPE

[Part: My Part]
Line: My Line
Repeat : My Line: My Collection
Scroll: Vertical
Common Border: Yes
XMLTag: MyVoucher

[Line: My Line]
Left Fields: Myfld1,MyFld2,MyFld3,MyFld4

[Field: Myfld1]
;;TYPE attribute specifies the data-type of the field
Type: Date
Set as : $Date
XMLTag: Date

[Field: Myfld2]
;;The USE keyword inherits the functionality/properties of the specified object
Use : Short Name Field
Set as : $VoucherTypeName
XMLTag: VoucherType

[Field: Myfld3]
Use : Name Field
Set as : $$CollectionField:$LedgerName:1:AllLedgerEntries
XMLTag : LedgerName

[Field: Myfld4]
Use : Amount Field
Set as : $Amount
XMLTag : Amount

;;Collection definition
[Collection: My Collection]
Type: Voucher

Notes:-
1) Export attribute at the Report level makes the Report exportable.
2) XMLTag attribute is used to specify the XML-Tag-name for the Report fields.
3) ExportButton is a predefined button definition.
4) You can fetch the above Report data manually (using Alt+E) or programmatically using RTSlink DLL, like you fetch data of other pre-defined reports.

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