A blog on Tally Integration, to import and export data from Tally.ERP programmatically using VB6, VB.NET,C#,ASP.NET etc

Monday, June 25, 2007

Introducing RTSlink v1.9

RTSlink v1.9 comes with a new function SQLDelete() that allows you to use SQL-DELETE statement to delete Tally Masters and Vouchers. For more information refer Using SQLDelete() function

Friday, June 22, 2007

Working with User-Defined-Collections

This post illustrates how to fetch data from User-defined-Collection (MyStatistics) which is created in program TDL26. For information on program TDL26, visit tdlplayground.blogspot.com


SQLRequest("Select $AllLegers,$DebtorsLedgers,$CreditorsLedgers from MyStaistics")

1) Create a TXT file (say Test.txt in C:\RTSLINK folder) that contains the following SQL-SELECT statement:-
Select $AllLegers,$DebtorsLedgers,$CreditorsLedgers from MyStatistics

2) Go to DOS-prompt and change to C:\RTSLINK folder.
3) Type out the following command:-

1) Wrapper.exe is shipped with RTSlink DLL
2) You must have RTSlink (Original or Demo version) installed in your system.

Wednesday, June 20, 2007

User-Defined Collection - RTSAllVouchers

RTSAllVouchers is a User-defined collection that we shall be using in many of our programs. Hence, the source code is once again provided herewith for your reference:-

;; PRODUCT: RTSAllVouchers
;; PRODUCT-ID: cc307cfa-1d7f-4f9a-92f8-xde60a2943be
;; AUTHOR: Shweta Computers
[Collection: RTSAllVouchers]
Type: Voucher
IsODBCTable: Yes
1) Create a plain TXT file using Notepad with the above code.
2) Copy the file to C:\Tally folder.
3) Make changes in Tally.ini for include the above file. Refer the article "How to use plain TXT files to customize Tally ?" for more information.

Wednesday, June 13, 2007

How to Count Number of Ledgers in Tally Company ?

At times we need to Count the number of records in a given Collection (i.e. Table). This can be done by using SQLRequest() function of RTSLink DLL.

The underneath statement shows how to fetch number of Ledgers :-

SQLRequest("Select $$NumItems:LEDGER from Ledger where $$ItemSerial=1")

Now let us try to understand the above SELECT statement.

1) $$NumItems is an Internal Tally function. It returns the Number of items in the specified Collection.

$$NumItems: <CollectionName>

The $$NumItems function is passed a Collection-Name, and it returns the number of Objects (records) in the LEDGER collection.

2) Why do we use the $$ItemSerial function ?

First of all, let us understand the functionality of $$ItemSerial function. It does not require any parameter and returns the number of records (lines) processed starting from 0. In simple words, if there are 5 Ledgers master records in the LEDGER collection, the $$ItemSerial will return 4.

Now, using $$ItemSerial=0 in the WHERE clause of the SELECT statement, will return a single row of information (i.e. the Ledger-Count). Try removing the WHERE clause and notice the difference.

It works the same way for other masters too. Example:-

Select $$NumItems:STOCKITEM from StockItem where $$ItemSerial=0

Thursday, June 7, 2007

Error Msg: Date 0-0--1900 is out of range

The above error message generally appears in the following cases:-

1) When you use XML tags to write a Voucher to Tally and the Voucher date is lesser than the Books beginning date in the Tally Company.

2) When you specify a date other than 1st or 2nd, and Tally is running in educational mode. In then Tally Education mode, you can enter vouchers for the 1st or 2nd of any month.

Tuesday, June 5, 2007

Using SQL-Select in Visual Basic to fetch Tally Data

For information, click "Using SQL-Select to fetch Tally Data from VB"

A common mistake in VB

One common problem faced by many programmers while using DLL functions in Visual Basic is NOT specifying the ByVal for String Parameters.

Correct Declaration
Declare Function SQLRequest Lib "RTSLINK.DLL" (ByVal strSQL As String) As Long

Incorrect Declaration
Declare Function SQLRequest Lib "RTSLINK.DLL" (strSQL As String) As Long

By default, parameters are passed by Reference in Visual Basic. If you need to pass the parameter ByVal, it has to be explicitly specified using the ByVal keyword.

Please note that the String parameters are to be always passed ByVal to DLL functions.

Friday, June 1, 2007

Introducing RTSlink DLL v1.8

RTSlink DLL v1.8 now comes with a new function SQLRequest() that allows you to use SQL-SELECT statements to fetch Tally data. You can fetch both Masters or Vouchers data including the Item-details and Ledger-details using simple SQL-SELECT statements. Example:-

a) Select $Name,$ClosingBalance from LEDGER
b) Select $Name from STOCKITEM order by $Name

For more informaion, visit www.rtslink.com

Online Registration of RTSLINK DLL License
RTSlink v1.8 comes with a Software Licensing module that allows you to Register or Surrender the RTSLINK DLL license either ONLINE or OFF-LINE.