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

Monday, September 22, 2008

Escape Sequences in XML, XSL

What is an Escape Sequence ?

"An Escape sequence is a series of characters which cause an escape from normal interpretation".

Escape sequences use a Special (Escape) character to change the meaning of characters that follow it.

For example, you cannot use the & (ampersand sign) in XML as you would normally use it elsewhere. The & (ampersand sign) is a special character and is to be used differently in XML.

This tag contains incorrect value.
<NAME>ABC & Company Ltd</NAME>

Here's the corrected tag.
<NAME>ABC &amp; Company Ltd</NAME>

XML Escape Sequences

In XML, there are 5 Escape sequences. Refer this link for more information on XML Escape sequences.

XSL Escape Sequences

XML Escape sequences are well documented and you can get lot's of information about it. But, what about using special characters in XSL ?

Well, the Escape sequences used in XML do NOT work in XSL. Now, let's try understand this.

Task 1
Search for all LEDGER nodes that have an attribute named NAME which contains "some-value".

This works fine.


Task 2
Search for all LEDGER nodes that have an attribute named NAME which contains "Here's a special one".

This does not work :-

//LEDGER[@NAME="Here's a special one"]

This does not work :-

//LEDGER[@NAME='Here&apos;s a special one']

This WORKS!!!

//LEDGER[@NAME='Here\'s a special one']

In Task 2, we search for a text-value that contains a special character ( ' ) .i.e. an apostrophe.

Friday, September 19, 2008

Tally Software || What is a Cancelled Voucher ?

Deleted voucher Vs Cancelled voucher

Deleting a Voucher

You can use Alt+D to manually delete a Voucher in Tally Software. When you delete a voucher, the Voucher and its effect is removed from the Tally Software.

Cancelling a Voucher

You can use Alt+X to manually cancel a Voucher in Tally Software. Cancelling a Voucher does not delete/remove the Voucher from Tally; but its effect is removed. In simple words, the Cancelled Voucher still appears in Tally; but it's effect is not reflected in Books of Accounts.

The XML tag <ISCANCELLED> is used to programmatically specify whether the Voucher is Cancelled or not.

Monday, September 15, 2008

Tally Group-Master XML tags contain Invalid unicode character

This prima-facie appears to be a BUG with Tally 9 and Tally 7.2

Steps to replicate the PROBLEM
1) Use the following SQL-SELECT to retrieve Tally data :-

Select $name , $parent from GROUPS

2) Extract of the XML-output generated by the above SQL-SELECT is given below for your reference:-

<COL>Branch / Divisions</COL>
<COL>&#4; Primary</COL>

Notice the line shown in RED color. It contains an invalid unicode character. When you load the data in XML DOM object, it does not work as there is an INVALID UNICODE CHARACTER.

This problems occurs even with Tally 7.2 which does not support UNICODE.