Documentos de Académico
Documentos de Profesional
Documentos de Cultura
DX-Fusion (Free Edition) is an utility that transfers data from Tally ERP 9 into your
database. It transfers all masters and all vouchers without any restriction on date or
voucher-type or number of records.
The DX-fusion (Commercial Editions) supports transfer of all masters and vouchers
from Tally into your database in Real-time (online mode).
Preface
This document is for Software developers who wish to get data from Tally ERP 9 into their database using VB6,
VB.NET, C# or any other programming language.
The sample program provided underneath is written in VB6. It uses the free utility DX-Fusion to get the Tally ERP 9
data into SQL Server. However, with some minor modifications (i.e. connection string) you can get the data in any
other database.
Getting data from Tally ERP 9 into SQL Server using VB / VB.NET / C# / PHP etc
It is presumed that you have already downloaded and installed the DX-Fusion Free Edition utility.
Steps :-
<!-- This is the request format which must be sent to the DX-FUSION server -->
<!-- You must specify proper values for tags given below -->
<ENVELOPE>
<HEADER>
<TALLYREQUEST>Export Data</TALLYREQUEST>
</HEADER>
<BODY>
<EXPORTDATA>
<REQUESTDESC>
<STATICVARIABLES>
<!-- If the Tally Server and DX-Fusion Server are on the same
machine -->
<!-- then keep 127.0.0.1 else specify the IP address for Tally
Server -->
<TALLYSERVERIP>127.0.0.1</TALLYSERVERIP>
<TALLYSERVERPORT>9000</TALLYSERVERPORT>
</STATICVARIABLES>
<REPORTNAME>RTSExportData</REPORTNAME>
</REQUESTDESC>
</EXPORTDATA>
</BODY>
</ENVELOPE>
<!-- This is the request format which must be sent to the DX-FUSION server -->
<!-- You must specify proper values for tags given below -->
<ENVELOPE>
<HEADER>
<TALLYREQUEST>Export Data</TALLYREQUEST>
</HEADER>
<BODY>
<EXPORTDATA>
<REQUESTDESC>
<STATICVARIABLES>
<!-- If the Tally Server and DX-Fusion Server are on the same
machine -->
<!-- then keep 127.0.0.1 else specify the IP address for Tally
Server -->
<TALLYSERVERIP>127.0.0.1</TALLYSERVERIP>
<TALLYSERVERPORT>9000</TALLYSERVERPORT>
</STATICVARIABLES>
<REPORTNAME>RTSExportData</REPORTNAME>
</REQUESTDESC>
</EXPORTDATA>
</BODY>
</ENVELOPE>
DX- Fusion
Product : DX-Fusion
Platform : Windows 2000 and above
Tally : Tally ERP 9 Release 1.61 and above
Category : Utility to transfer data from Tally Software into RDBMS (database) in real-time.
An Introduction to DX-Fusion
DX-Fusion is an utility that transfers data from Tally Accounting Software into your database in real-time.
It supports MS-SQL Server, MS-Access, MySQL, Oracle and many other popular databases.
DX-Fusion works with Tally ERP 9 Release 1.61 and higher versions. It can retrieve data from Tally in
both online (real-time) and off-line modes.
DX-Fusion utility does NOT require any coding (except for a connection-string to connect to the database)
and can be used by developers and end-users both. Developers can use this data for designing of MIS
reports and Integration with other external softwares.
DX-Fusion Editions
Free Edition
A fully functional edition of DX-Fusion utility which supports transfer of all masters and vouchers data from
Tally Sofware into your database without any restriction on number of entries or any date restriction. It
supports off-line mode only.
Standard Edition
A software utility for transferring masters and vouchers data from Tally Accounting Software into your
database in Real-time (online mode).
Download
DX-Fusion (Free Edition)
Getting Started
DX-Fusion - Getting Started
FAQs
Frequently Asked Questions
Blog
http://dx-fusion.blogspot.com
In simple words, you can create plain TXT files (using any editor like Notepad) and
customize Tally Accounting Software. It works with Tally 7.2 and Tally 9. It even
works with the educational version of Tally. Other users may try it own their own.
STEPS:-
[Menu: MySubMenu]
Item: MyOption1
Item: MyOption2
Item: MyOption2
3) Open the file Tally.ini using Notepad which is located in the Tally folder and make the following changes:-
4) Save the Tally.ini file and then run the Tally Software.
5) A new menu-option will appear in the "Gateway of Tally" screen at the end.
An Alphabetical-list of TDL functions (Partial list) is provided herewith for your reference.
Example:
$$IsVchTypeOfFamily: $VoucherTypeName :
$$IsVchTypeOf $$IsVchTypeOfFamily
Logical "Payment"
Family :<VoucherTypeName>
Remarks:
The function $$IsVchTypeOfFamily returns
true if the Field-value of $VoucherTypeName
is "Payment"
Returns the Date as per your computer
system settings
$$MachineDate $$MachineDate Date
Example:-
Select $$MachineDate from Company
Returns the Time as per your computer
system settings
$$MachineTime $$MachineTime String
Example:-
Select $$MachineTime from Company
Returns the Miniimum value. The parameter
Same as type can be Numeric, Date or String
$$Max $$Max : <Expression>
parameter type Example:-
$$Max:100:15 returns 100
$$Min $$Min : <Expression> Same as Returns the Miniimum value. The parameter
parameter type type can be Numeric, Date or String
Example:-
$$Min:100:15 returns 15
Returns the ending date of the specified
month.
$$MonthEnd $$MonthEnd: <ExpD> Date
Example:-
Select $$MonthEnd:$$MachineDate from
Company
Returns the Month (example 12) of the
specified date
$$MonthOfDate $$MonthOfDate:<ExpD> Numeric
Example:-
Select $$MonthOfDate:$$MachineDate from
Company
Returns the starting date of the specified
month.
$$MonthStart $$MonthStart: <ExpD> Date
Example:-
Select $$MonthStart:$$MachineDate from
Company
$$Round function is used to round-off a
$$Round : <ExpN> : value
$$Round Numeric
<RoundLimit> Example:-
$$Round : 125.72 : 0.10 returns 125.70
$$Round function is used to round-off a
$$RoundDown : <ExpN> : value
$$RoundDown Numeric
<RoundLimit> Example:-
$$Round : 125.72 : 0.10 returns 125.70
$$Round function is used to round-off a
$$RoundUp : <ExpN> : value
$$RoundUp Numeric
<RoundLimit> Example:-
$$Round : 125.72 : 0.10 returns 125.80
Returns the number of companies currently
$$SelectedCmps $$SelectedCmps Numeric open in Tally Software. Refer Example at
www.rtslink.blogspot.com
Returns the Tally Serial Number. Refer
$$SerialNumber $$SerialNumber String example at
www.rtslink.blogspot.com
Converts numeric expression into string.
Example:-
$$String $$String: <ExpN> String
[Field: My Field]
Set as : $$String:500
Returns the length of the string parameter
Example:-
$$StringLength $$stringLength: <ExpC> Numeric
[Field: My Field]
Set as: $$StringLength:"Shweta Softwares"
Used to extract a sub-string from another
string.
Example:-
[Field: My Field]
Set as: $$StringPart:"Shweta
$$StringPart: <expC>: Softwares":7:9
$$StringPart String
<StartPos>: <Length>
Remarks:-
This will return "Computers".i.e. beginning at
the 8th character, it returns the next 9
characters. Please note that the 1st
character is numbered as 0.
$$StringRemWord $$StringRemWord: <Index>: String Returns the remaining word from the
<ExpC> <ExpC> string after the Index.
Example:-
$$StringRemWord:2:"Shweta Softwares
Gandhidham"
This returns the word "Gandhidham". i.e. the
word after 2 words as specified by the Index
Returns the word specified by the Index.
Example:-
$$StringWord: <Index>:
$$StringWord String $$StringWord:2:"Shweta Softwares
<ExpC>
Gandhidham"
This returns the word "Computers". i.e. the
2nd word as specified by the Index
Specifies the System-name for the reserved
$$SysName $$SysName: <reserved-string> String
string
Returns the value for the System variable
SVFROMDATE
$$SystemPeriod
$$SystemPeriodFrom Date Example:-
From
Select $$SystemPeriodFrom from Company
or
Select ##SVFROMDATE from Company
Returns the value for the System variable
SVTODATE
Example:-
[Field: My Field]
Use: Name Field
Method/Field
$$Value $$Value Validate: NOT $$IsEmpty:$$Value
data type
In the above code, function $$Value is used
which returns the value of the field 'My
Field'.
Refer program TDL34
Returns the Year for the specified Date.
Example:-
$$YearOfDate $$YearOfDate: <ExpD> Numeric Select $$YearOfDate:$$MachineDate from
Company
Example:-
$$YearEnd $$YearEnd: <ExprD> Date
Select $$YearEnd:##SVTODATE from
Company
You can test check the TDL functions by writing TDL code or by using WRAPPER.EXE
provided with RTSlink DLL.
Tags:
Here's a sample Excel sheet that contains Sales Vouchers (without Items). As this is the first exercise (for
Vouchers), we have purposely taken up a simple Excel sheet.
Here's what the sample Excel sheet looks like.
Column A - Invoice No
Column B - Invoice Date
Column C - Party Name
Column D - Sales Ledger
Column E - Narration
Column F - Invoice Amount
1) First, you must write XML tags to create Masters (i.e. Party Ledgers and Sales Ledgers) . As you can
see in the Excel sheet snapshot, the Column C contains Party Names whereas the Column D contains the
Sales Ledgers. The XML tags to create Ledger Masters look like this :-
<MASTER TYPE="LEDGER">
...... tags......
</MASTER>
Remarks:-
a. Please refer the XML tags file for complete tags. You can also view it online by clicking on the link
given above.
b. UDIMagic first processes the MASTER tags and then the VOUCHER tags.
2. You can get the Tally supported tags for Vouchers from Tally Software itself. All you need to do is to
manually enter the sample data (only 1 voucher) as given in the Excel sheet into the Tally Software.
Next, export it in XML format using option "Gateway of Tally >> Display >> Daybook >> Alt+E". This will
generate the tags in Daybook.xml file. You can open/view these tags in IE. In the Daybook.xml file, refer
to the tags that appear within the <TALLYMESSAGE> tag and try relating the same with the tags as given
in the XML tags for this exercise.
Welcome to the world of VBA / Macros
VBA or Visual Basic for Applications is a light weight programming language (quite similar to Visual Basic)
that allows automation of tasks in MS-Office Applications.
UDI Magic v3.0 or higher supports the use of VBA. Using VBA, you can sort data; perform calculations;
insert or delete columns or rows in MS-Excel at run-time. In simple words, VBA allows you to do almost
any task that you can manually do in MS-Office Applications.
In this exercise, we shall take up "How to use VBA (Visual Basic for Applications) with UDI Magic ?"
To begin with, we shall write a simple macro that displays a message "Hello World". You can use
Notepad (or any text-editor) to create macro files. Here's a simple macro file (Exercise-15-macro.txt)
which displays a message.
Sub HelloWorld
MsgBox "Hello World !!!"
End Sub
Remarks:-
Sub...End Sub is used to declare a procedure / routine.
Before we write XML tags for importing data from our Excel sheet into Tally, let's have a look at the UDI
Magic supported XML tags for loading and executing macros.
Syntax:-
<VBA LOADFILE="macro-filename-with-path" RUNMACROATSTARTUP="macro-name"/>
Example 1:-
<VBA LOADFILE="exercise-15-macro.txt" RUNMACROATSTARTUP="HelloWorld"/>
Example 2:-
<VBA LOADFILE="c:\exercise-15-macro.txt" RUNMACROATSTARTUP="HelloWorld"/>
Explanation:-
1) In the first example, we have not specified the full-path for the macro-file. Hence, UDIMagic searches
for the macro-file in the UDI Magic startup folder. In the second exmple, we have specified the full-path
for the macro-file.
2) The tag <VBA> is UDI Magic specific.
3) The attribute LOADFILE="macro-filename" is used to specify the macro-filename.
4) The attribute RUNMACROATSTARTUP is used to specify the macro name which is to be executed at
startup.
5) The Macro-file is executed before the Excel sheet data is processed. As a result,the macro used in this
exercise displays a message "Hello World".
To make the task simple, we shall take up an Excel sheet with Stock Item Masters records (having only
one field i.e. the NAME field).
The XML tags used in this exercise are quite simple. We have already written such tags (for Stock Item
Master) in our previous exercises. Now, let's see how do we import data into multiple companies...
STEP 1
Write XML tags to create STOCKGROUP masters
Remarks:-
1) Note that COMPANYNAME attribute is used to specify in which Company the data is to be imported.
2) We used the same tags twice, only the Company Name has been changed.
STEP 2
Write XML tags to create STOCKITEM masters
To import data into a specific Company in Tally, you need to use the COMPANYNAME attribute.
Generally, this is required when two or more companies are open in Tally and you wish to import data
into a specific company.
Herein, we shall take a simple Excel sheet that contains Stock Item Masters. For simplicity, we have
taken only the Stock Item NAME in the Excel Sheet.
If everything goes fine, then 5 Stock Item master records will be imported into "Company B" in Tally.You
can view the same using "Gateway of Tally >> Inventory Info >> Stock Item >> Display" option.
Attribute : COMPANYNAME
Applies to: MASTER and VOUCHER tags
Example 1:-
<VOUCHER COMPANYNAME="MyCompany">
.....XML tags.....
</VOUCHER>
Remarks:-
1) The COMPANYNAME attribute can be used with the MASTER and VOUCHER tags only.
2) If there two or more MASTER tags (or VOUCHER tags) in a single XML file, then you need to use the
COMPANYNAME attribute with each MASTER tag.
Here's a snapshot of the Excel sheet that we shall be using in this exercise. You can create a similar sheet
STEP 1
Write XML tags to create UNIT masters
<MASTER TYPE="UNIT"/>
<NAME COLUMNREFERENCE="D"/>
<ISSIMPLEUNIT>Yes</ISSIMPLEUNIT>
</MASTER>
STEP 2
Write XML tags to create STOCKGROUP masters
<MASTER TYPE="STOCKGROUP"/>
<NAME.LIST>
<NAME COLUMNREFERENCE="C"/>
<NAME.LIST>
</MASTER>
STEP 3
Write XML tags to create Stock Item Masters
<NAME.LIST>
<!-- Fetch the value for NAME tag from Column A of Excel Sheet -->
<NAME COLUMNREFERENCE="A"/>
<!-- ALIAS to be taken from Column B of Excel Sheet -->
<NAME COLUMNREFERENCE="B"/>
</NAME.LIST>
<!-- StockGroup Name is to be taken from Column C-->
<PARENT COLUMNREFERENCE="C"/>
<!-- BaseUnits is to be taken from Column D-->
<BASEUNITS COLUMNREFERENCE="D"/>
</MASTER>
a) As you can see in the Excel sheet, the Standard Cost and Standard Price data for the first Master
Record "BunnyBT1" spans to 3 rows. Also note that the Column A (key-field) contains the same Name i.e.
"BunnyBT1" as all these 3 rows are part of one MASTER record.
b) Example:-
<STANDARDCOSTLIST.LIST SCROLL="Yes">
<DATE COLUMNREFERENCE="E"/>
<RATE FORMULA="=+F# & "/" & +G#"/>
</STANDARDCOSTLIST.LIST>
The SCROLL attribute used in the above XML tags, instructs UDI Magic that the data spans to multiple
rows.
c) Use option "Alter Standard Rates" to specify the Standard Cost and Price details in the Stock Item
Master as shown below:-
Exercise 11
Alternative 1
Change the Heading in Cell A1 to NAME
Alternative 2
<COLUMNNAME.LIST>
<COLUMNNAME>NAME</COLUMNNAME>
</COLUMNNAME.LIST>
Remarks:-
1) Tally use the Master's NAME as the key-field to uniquely identify the Master records. Hence, we must
have a Column titled as NAME or specify the same using <COLUMNNAME> tag.