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

Sunday, July 1, 2007

Fetch Tally Voucher data including Stock-Item details

This post illustrates how to fetch Tally Voucher data including Item-Name, Item-Qty, Item-Rate using the SQL-SELECT statement.
(SQL-SELECT works with RTSlink v1.8 or higher)


Using Wrapper EXE to invoke SQL-SELECT statement
1) Create a TXT file (say SQL1.TXT) which contains the following code:-

SELECT $Date,$VoucherTypeName,$VoucherNumber,$Amount,
$$FullList:InventoryEntries:$StockItemName,
$$FullList:InventoryEntries:$BilledQty,
$$FullList:InventoryEntries:$Rate
FROM RTSAllVouchers

2) Go to DOS Command-prompt and change to "C:\RTSLINK" folder.
3) Next, type the following command :-


WRAPPER SQL1.TXT /SQL


4) Check for the output in RESPONSE.LOG file.

Using the DLL in Visual Basic, VFP or any Win32 application
Syntax : SQLRequest( <SQL-SELECT statment>)
Remarks : Substitute the SELECT statement as given in the Wrapper exe sample.

Notes:
1) $$FullList is a Tally Internal Function. It
processes the given Collection and returns the Field data.
Syntax : $$FullList : <CollectionName> : <Method/ FieldName>
Return Value : String

2) InventoryEntries is a pre-defined Collection. It stores the Stock-Item related information for Tally Vouchers.
3) Date, VoucherTypeName,VoucherNumber,Amount are Fields (also called Methods) of the VOUCHER Object. To fetch Fields/Method data, they are to be pre-fixed by $ sign.


No comments: