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

Thursday, October 18, 2007

Corrections in ldaily.txt and ldaily.xml

Minor corrections have been done in the XML and TDL file to fetch "Ledger Daily balances" using RTSlink DLL.

FILE: ldaily.txt

Old Code
Set : LedgerName: "Cash"

New Code
Set : LedgerName: If $$IsEmpty:##LedgerName then "Cash" else ##LedgerName

Please see:
A syntax error in lDaily.xml has also been rectified.

Wednesday, October 17, 2007

Bug in $$ItemSerial TDL function

Tally Integration using RTSlink DLL

$$ItemSerial [TDL function]

"The function $ItemSerial generates Line numbers beginning from 0. It does not accept any parameter and returns Numerical value. "

Using $ItemSerial function with Masters

SELECT $$ItemSerial,$Name FROM Ledger

Remarks:-
The $$ItemSerial works fine when used with any MASTER's Collection like LEDGER, GROUP,STOCKITEM etc. However, it returns random (incorrect) values when used with VOUCHER object as shown below.

Using $$ItemSerial function with Vouchers

SELECT $$ItemSerial, $Date, $VoucherTypeName, FROM RTSAllVouchers

Remarks:-
1) When you use the above SELECT statement, the $$ItemSerial function returns random values and not the line serial number starting from 0 as in case of MASTERs.

2) RTSAllVouchers is a user-defined collection and its TDL code has been provided in my earlier post.

BUG:
It has been confirmed by Tally Solutions, Bangalore that the $$ItemSerial function generates (incorrect) random values when used with the VOUCHER object.

Please note that both Tally 7.2 and Tally 9 have the $$ItemSerial bug.

Thursday, October 11, 2007

CompanyVouchers collection

FAQs : Tally Integration using RTSlink DLL

When I use the CompanyVouchers collection, Tally Server returns vouchers for the current-date only.

CompanyVouchers is a pre-defined collection. The Collection definition is given herewith for your reference:-

[Collection: Company Vouchers]
Type : Voucher
Child of : ##SVCurrentDate
Report : Voucher
IsODBCTable : Yes

As you can see, this collection is filtered for the Current-date using the ChildOf attribute. Hence, it returns Vouchers for the current-date only.

To retrieve all Vouchers, you can use the RTSAllVouchers Collection.

Tuesday, October 9, 2007

XML tags to create Sales Voucher in Tally Software

Corrections
Minor changes have been done in the CreSale.xml file. It now includes XML tags for creating Unit master also.

Download the cresale.zip file

For other downloads, visit www.rtslink.com/downloads.html

Remarks:-
CreSale file contains XML tags to create a Sales Voucher programmatically using RTSlink DLL. Tested with Tally 7.2 an Tally 9

Monday, October 8, 2007

BAD PARSE Error

FAQ's :- Tally Integration using RTSlink DLL

I am getting "BAD PARSE" error while using the Send() function of RTSlink DLL

This post is applicable to Tally 9 or higher versions only.

Why does the BAD PARSE Error appear ?
The Tally Server responds with "BAD PARSE" error when it is enable to parse the XML request that you had sent using the Send() function. In simple words, it means that the XML tags that you used with the Send() function are incorrect.

Well, the Answer is as very simple "Check the XML tags". But does this really solve the problem. Yes and No, both. Confused, don't worry, continue reading-on.

Things worsen if somebody tells you that the XML tags are generated from Tally Software itself, by using Export option.

Now, let us try to understand the situation.

Case 1
1) Create a new Company and do a Voucher Entry (any voucher)
2) Use the option "Display -> Daybook -> Alt+E " to export the data. Keep the "Language" option as "Default (All Languages)" and export it in XML format.
The above will export the data into "Daybook.xml" file.

Try out using RTSlink DLL with the the XML tags generated in Daybook.xml file. This generates "BAD PARSE" Error.

Case 2
1) Use the option "Display -> Daybook -> Alt+E " to export the data. Set the "Language" option as "Restricted (Ascii) " and export it in XML format.
The above will export the data into "Daybook.xml" file.

Try out using RTSlink DLL with the XML tags generated in Daybook.xml file. It works.

What caused the problem in Case 1 ?
As you can see, in the 1st case we exported the data in "Default (All languages)" format which defaults to UNICODE format. In the Unicode format, each character occupies TWO bytes for storage as compared to ONE bytes in UTF-8 format (default for Tally 7.2 / 8.1).

Conclusion

When you export Tally data, ensure that the "Language" option is set to "Restricted (Ansii format)".

Thursday, October 4, 2007

VB.NET error : Attempting managed execution inside OS Loader lock

FAQ's - Tally Integration using RTSlink

I am trying to link my VB.NET application with Tally using RTSlink DLL. But I get this error while calling RTSOpen() function :-

"Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang. "

Solution:-
1. Go to Debug/Exceptions
2. Open up the Managed Debugging Assistants node on the tree and scroll down till you find LoaderLock and uncheck it.

After this recompile the project.