Tally ERP 9 | Tally 9 | Tally 8.1 | Tally 7.2 | Tally 6.3 | Learn Tally TDL

Saturday, June 30, 2007

Report Inheritance : How to Create new Reports based on existing Reports?

Program TDL28 illustrates the concept of Report Inheritance. i.e. creating a new Report based on a existing Report. Download TDL28

;; PRODUCT: TDL28.TXT
;; PRODUCT-ID: cd205cfa-1d7f-4f9a-92h8-ace40a5943be
;; AUTHOR: Shweta Computers
;;=========================================================================

;;Modify the Gateway of Tally menu to add a new Menu item
[#Menu: Gateway of Tally]
Add: Item: My Daybook: Display: My Daybook

;;Report Definition
[Report: My Daybook]

;;This inherits the functionality of existing (pre-defined) Report
Use : Voucher Register

;;Change the default Period
Set : SVFROMDATE: $$DateFrom
Set : SVTODATE : $$DateTo

;; Notes:-
;; 1) $$DateFrom function returns the date from which the period begins
;; 2) $$DateTo function returns the date with which the period ends
;; 3) SVFROMDATE is a pre-defined Global variable
;; 4) SVToDATE is a pre-defined Global variable

Saturday, June 23, 2007

Voucher Statistics using $$IsPayment, $$IsReceipt etc

You can fetch Voucher statistics using $$IsPayment, $$IsReceipt and others similar functions. For more information on these TDL functions, refer www.rtslink.com

Syntax:-
$$IsPayment: <VoucherTypeName>

Return Value:
Logical

Download TDL27 program.

This TDL program creates a Collection/table which contains Voucher statistics data. To view the Collection data, you can use SQLRequest() function of RTSlink DLL. Refer, rtslink.blogspot.com for more information.

;; PRODUCT: TDL27
;; PRODUCT-ID: ad157cfa-2s7f-4g9a-52f8-ade40a2983be
;; AUTHOR: Shweta Computers
;;==========================================================================
;;This program defines a Collection called VCHStatistics.
;;This collection can be accessed using SQLRequest() function of RTSlink DLL
;;==========================================================================

;;****** Collection definition ******
;;VCHStatistics is a collection that contains a single Object (record) called MyObjects.
;;IsODBCTable is set as YES so that this collection is accessible to external programs

[Collection: VCHStatistics]
Object: MyObjects
IsODBCTable: Yes

;;******* Object Definition *********
;;Herein we are defining an Object called "MyObjects" which comprises of THREE fields
;;1st: PaymentVouchers - Number of Payment Vouchers
;;2nd: ReceiptVouchers - Number of Receipt Vouchers
;;3rd: AllVouchers - Total Number of Vouchers

;;The FilterCount function requires a Formula (i.e. condition) as the 3rd parameter.
[Object: MyObjects]
PaymentVouchers : $$FilterCount:RTSAllVouchers:HasPaymentVouchers
ReceiptVouchers : $$FilterCount:RTSAllVouchers:HasReceiptVouchers
AllVouchers : $$FilterCount:RTSAllVouchers:AlwaysTrue

;;******* Global Formula definition ********
;;$VoucherTypeName refers to the Field NAME of Voucher Collection

[System: Formula]
HasPaymentVouchers : $$IsPayment:$VoucherTypeName
HasReceiptVouchers : $$IsReceipt:$VoucherTypeName
AlwaysTrue : $$IsWindows


;;******* Collection Definition ********
;;This makes the pre-defined Voucher Collection accessible to external programs
;;and also to the user-defined collection VCHStatistics
;;
[Collection: RTSAllVouchers]
Type: Voucher
IsODBCTable: Yes

;;Notes
;;=====
;; $$IsPayment is a Tally Interenal Function that is used to check whether a Voucher is
;; Payment Voucher or not
;; Syntax :- $$IsPayment:
;; Return Value:- Logical
;;
;; $$IsReceipt is a Tally Interenal Function that is used to check whether the Voucher is
;; Receipt Voucher or not
;; Syntax :- $$IsReceipt:
;; Return Value:- Logical
;;
;; $$IsWindows is a Tally Internal Function which checks whether the OS is Windows or not.
;; Syntax :- $$IsWindows
;; Return Value:- Logical

Friday, June 22, 2007

Example 26: Using $$FilterCount function

FilterCount is a Tally (Internal) function that allows you to count records of a Collection/table based on a filter condition.

Syntax:-
$$FilterCount: <CollectionName> : <Condition>

Return Value:
Numeric

Download TDL26 program.

This TDL program creates a Collection/table which contains some statistics data. However, this data is not displayed directly in Tally. To view the Collection data, you can use SQLRequest() function of RTSlink DLL. Refer, rtslink.blogspot.com for more information.

;; PRODUCT: TDL26
;; PRODUCT-ID: cd387cfa-1d7f-4g9a-52f8-ace40a2983be
;; AUTHOR: Shweta Computers
;;==========================================================================
;;This program defines a Collection called MyStatistics.
;;This collection can be accessed using SQLRequest() function of RTSlink DLL
;;==========================================================================

;;****** Collection definition ******
;;MyStatistics is a collection that contains a single Object (record) called MyObjects.
;;IsODBCTable is set as YES so that this collection is accessible to external programs

[Collection: MyStatistics]
Object: MyObjects
IsODBCTable: Yes

;;******* Object Definition *********
;;Herein we are defining an Object called "MyObjects" which comprises of THREE fields
;;1st: DebtorsLedgers - Number of Ledgers falling under group Sundry Debtors
;;2nd: CreditorsLedgers - Number of Ledgers falling under group Sundry Creditors
;;3rd: AllLedgers - Total Number of Ledgers

;;The FilterCount function requires a Formula (i.e. condition) as the 3rd parameter.
;;which is defined below
[Object: MyObjects]
DebtorsLedgers : $$FilterCount:Ledger:HasSundryDebtors
CreditorsLedgers: $$FilterCount:Ledger:HasSundryCreditors
AllLedgers : $$FilterCount:Ledger:AlwaysTrue

;;******* Global Formula definition ********
;;$Name refers to the Field NAME of Ledger Collection

[System: Formula]
HasSundryDebtors : $$IsLedOfGrp:$Name:$$GroupSundryDebtors
HasSundryCreditors: $$IsLedOfGrp:$Name:$$GroupSundryCreditors
AlwaysTrue : $$IsWindows

;;Notes
;;=====
;; $$IsLedOfGroup is a Tally Interenal Function that is used to check whether a Ledger falls under a
;; specific Group or not.
;; Syntax :- $$IsLedOfGroup: <LedgerName>: <GroupName>
;; Return Value:- Logical
;;
;; $$IsWindows is a Tally Internal Function which checks whether the OS is Windows or not.
;; Syntax :- $$IsWindows
;; Return Value:- Logical
;;
;; $$GroupSundryDebtors is a Tally Internal Function
;; Syntax :- $$GroupSundryDebtors
;; Return Value:- String: The Group-Name for pre-defined Tally Group "Sundry Debtors"
;;
;; $$GroupSundryCreditors is a Tally Internal Function
;; Syntax :- $$GroupSundryCreditors
;; Return Value:- String: The Group-Name for pre-defined Tally Group "Sundry Creditors"

Monday, June 18, 2007

Example 25: Adding Voucher-Creation-Date/Time

This program TDL25 adds FOUR (invisible) fields to the Voucher entry screen. The fields are as follows:-
a) Voucher-Creation-Date
b) Voucher-Creation-Time
c) Voucher-Alteration-Date
d) Voucher-Alteration-Time

The basic idea of adding these fields is to keep track of "Vouchers that have been added or modified during a specific period ?"

Create a plain text file that contains the following Code. For those who have joined now, please note that you can use plain TXT files to customize Tally even without Tally Developer. For more information, refer post "How to Customize Tally Software using TXT files ?"

CODE

;; PRODUCT: 
;; PRODUCT-ID: cc307cfa-1d7f-4f9a-92f8-ace40a2943be
;; AUTHOR: Shweta Computers
;;=====================================================================

;;UDF's declaration. New fields declaration
;;=====================================================================
[System: UDF]
fldVCHCreationDate : Date : 1025
fldVCHCreationTime : String: 1026
fldVCHAlterationDate: Date : 1027
fldVCHAlterationTime: String: 1028

;;This will expose the newly added fields through Voucher Object so
;;that it can be accessed elsewhere
;;=====================================================================
[#Object: Voucher]
VCHCreationDate : $fldVCHCreationDate
VCHCreationTime : $fldVCHCreationTime
VCHAlterationDate: $fldVCHAlterationDate
VCHAlterationTime: $fldVCHAlterationTime

;;The Voucher Object is modified to include optional definitions
;;a) In case of Voucher Creation, the prtVchNarrationInCreateMode replaces
;; the existing VoucherNarration Part definition
;;b) In case of Voucher Altertion, the prtVchNarrationInAlterMode replaces
;; the existing VoucherNarration Part definition
;;=====================================================================
[#Part: VCH Narration]
Option: prtVCHNarrationInCreateMode : $$InCreateMode AND NOT $$InDuplicateMode
Option: prtVCHNarrationInAlterMode : $$InAlterMode OR $$InDuplicateMode

;;Optional Part definition
[!Part: prtVCHNarrationInCreateMode]
;; Local: Line : VCH NarrPrompt: Add: Fields: Short Prompt
;; Local: Field: Short Prompt : Set as: "Create mode: "
Add: Line: LnVCHNarrationInCreateMode

;;Line definition
[Line: lnVCHNarrationInCreateMode]
Add : Fields: VCHCreationDate
Add : Fields: VCHCreationTime

;;Optional Part definition
[!Part: prtVCHNarrationInAlterMode]
;; Local: Line : VCH NarrPrompt: Add: Fields: Short Prompt
;; Local: Field: Short Prompt : Set as: "Alter mode: "
Add: Line: LnVCHNarrationInAlterMode

;;Line definition
[Line: lnVCHNarrationInAlterMode]
Add : Fields: VCHAlterationDate
Add : Fields: VCHAlterationTime

;;Field definition for Voucher Creation Date
;;=====================================================================
[Field: VCHCreationDate]
Use: Short Date Field
Storage: fldVCHCreationDate
Set as: $$MachineDate
Set Always: Yes
;;Try changing Invisible to NO
Invisible: Yes

;;Field definition for Voucher Creation Time
;;=====================================================================
[Field: VCHCreationTime]
Use: Short Name Field
Storage: fldVCHCreationTime
Set as: $$MachineTime
Set Always: Yes
;;Try changing Invisible to NO
Invisible: Yes

;;Field definition for Voucher Alteration Date
;;=====================================================================
[Field: VCHAlterationDate]
Use: Short Date Field
Storage: fldVCHAlterationDate

;;This will forcefully store the $$MachineDate (i.e. CurrentDate in field)
Type: Date: Forced

Set as: $$MachineDate
Set Always: Yes

;;Try changing Invisible to NO
Invisible: Yes

;;Field definition for Voucher Alteration Time
;;=====================================================================
[Field: VCHAlterationTime]
Use: Short Name Field
Storage: fldVCHAlterationTime

;;This will forcefully store the $$MachineTime (i.e. CurrentTime in field)
Type: String: Forced

Set as: $$MachineTime
Set Always: Yes

;;Try changing Invisible to NO
Invisible: Yes
Download the TDL25 sample program.

Friday, June 15, 2007

TDL programs 16 to 20

TDL programs 16 to 20 have been re-checked/verified for Tally 9/Tally 7.2.

You can now use/or modify these programs even without having Tally Developer software.

For more information on using TXT files to customize Tally or to download these programs, visit "How to use TXT files to customize Tally Accounting Software"

Saturday, June 9, 2007

TDL programs 11 to 15

TDL programs 11 to 15 have been re-checked/verified for Tally 9/Tally 7.2.

You can now use/or modify these programs even without having Tally Developer software.

For more information on using TXT files to customize Tally or to download these programs, visit "How to use TXT files to customize Tally Accounting Software"

Friday, June 8, 2007

TDL programs 6 to 10

TDL programs 6 to 10 have been re-checked/verified for Tally 9/Tally 7.2.

You can now use/or modify these programs without having Tally Developer. For information or to download these programs, visit "How to use TXT files to customize Tally Accounting Software"

Thursday, June 7, 2007

How to Customize Tally Accounting Software using TXT files ?

Yes. You can customize Tally Accounting Software (Tally 7.2 / Tally 9) using TXT files. No need of Tally Developer for compiling files.

For more information visit How to customize Tally Accounting Software at www.rtslink.com

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