Home / RTSlink DLL / .NET

RTSlink DLL in .NET

RTSlink is a Dynamic Link Library (DLL) that allows Software Developers to Integrate their Applications with Tally Accounting Software. Using RTSlink, developers can pull data from Tally Software into their .NET application or push data from their .NET application into Tally Software.

PUSH data into Tally
RTSlink DLL allows you to programmatically create; alter or delete any Master record or Voucher record in Tally.

PULL data from Tally
RTSlink DLL can be used to programmatically pull Master's data or Vouchers from Tally. You can also fetch Tally Reports in XML, SDF and HTML formats.

Sample code for using RTSlink DLL in .NET has been provided underneath. It creates a Group Master "My Debtors" in Tally. For XML tags to create Vouchers, refer the downloads section. 

Download sample code for using RTSlink DLL in C# 
Download sample code for using RTSlink DLL in VB.NET 
Download sample code for using RTSlink DLL in ASP.NET (with C# or VB.NET)

Please note:-
RTSlink DLL can be used in ASP.NET (with C# or VB.NET) web-based projects in a Local Area Network only. For deploying solutions on a Remote Server, we can provide customized solutions for .NET platform or Java.

Using RTSlink DLL in C#

Here's a sample C# program to create a Group Master named "My Debtors" in Tally.

//Create a new 'Windows Application' project in C#
//Place a button on the Form. The button Code is given below as "private void button_click1"
//The whole code would look like this as given below.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace RTSlink001
{ public partial class Form1 : Form
               //RTSlink DLL functions declaration
               [DllImport("RTSLink.dll")] extern static int Open();
               [DllImport("RTSLink.dll")] extern static int Send(string request);
               [DllImport("RTSLink.dll")] extern static string ResponseText(); 

               public Form1()
              { InitializeComponent();

              //This is the button code which gets executed when the Button is clicked 
              private void button1_Click(object sender, EventArgs e) 
                  string strResponse = null; 
                  string strXMLfile = ""; 
                  int n = 0; 

                  //XML String that contains request to be sent to Tally Software
                  //This request will create a Group called 'My Debtors'
                  strXMLfile = "<ENVELOPE><HEADER><TALLYREQUEST>Import Data</TALLYREQUEST></HEADER>
                         <REQUESTDESC><REPORTNAME>All Masters</REPORTNAME></REQUESTDESC>
                         <REQUESTDATA><TALLYMESSAGE xmlns:UDF='TallyUDF'>
                         <GROUP NAME='My Debtors' ACTION='Create'>
                         <NAME.LIST><NAME>My Debtors</NAME></NAME.LIST>
                         <PARENT>Sundry Debtors</PARENT>

                 //Invoke RTSlink DLL Open() function to check whether Tally is running or not ?
                 //Zero means Tally Software is running.
                 n = Open();
                 if (n == 0)
                      //Invoke Send() function of RTSlink DLL
                      //Send request to Write data to Tally (Create a Group named "My Debtors")
                      if (Send(strXMLfile) == 0)
                           //Invoke ResponseText() of RTSlink DLL 
                            strResponse = ResponseText();
                            MessageBox.Show(strResponse, "Group Created Successfully");
                            MessageBox.Show("Send() function failed", "Send() error");
                      MessageBox.Show("Cannot connect to Tally", "Tally not running"); 


Using RTSlink DLL in VB.NET

For VB.NET projects, please download the code from the links given above.

Using RTSlink DLL in ASP.NET (with C# or VB.NET)


1) Create a new folder 'RTSLINK'  in  C:\inetpub\wwwroot
2) Copy the files 'default.aspx' and 'default.aspx.cs' into C:\inetpub\wwwroot\rtslink
3) Start IE (Internet Explorer) and type out the following in the address:-
4) Click on the the Connect button.

a) If everything goes fine, you will get a message 'SUCCESS. Importing data to Company:....... '
b) Tally Software must be running in background with one Company open.

Tags: Tally Integration, C# to Tally, VB.NET to Tally, ASP.NET to Tally, Help
Tally is a registered trademark of Tally Solutions FZ LLC.

Valid HTML 4.01 Transitional