banner banner Skip to main content

Posts

Showing posts from September, 2015

DLL Collection, its Attributes and Usage

Tally now provides a TDL interface to obtain data sets in Collection from external Plug-Ins. These Plug-Ins are written as DLL’s which can be used to fetch external data (i.e., from Internet, external Database, etc.). These DLL's should return a valid XML which can be easily mapped into TDL Collection. In other words, TDL developer can provide a simple string value and/or XML to the DLL function. The DLL gives XML data as an output. Collection takes this data and converts it into objects and object methods, which can be accessed in TDL like other objects. DLL collection will be very useful in the following scenarios 1. To display stock quotes from the internet 2. To get data from different formats like CSV, HTML 3. External device interfaces 4. RFID Barcode scanner 5. Petrol Pump device interface 6. Foot fall count 7. External application interfaces 8. GAS distributor application 9. To get attendance details in Pay Roll through swipe In DLL collection, support is...

DLL Approach in Tally

Dynamic Link Library (DLL) is a file that can contain many functions. We can compare it with the library functions provided with many programming languages like C, C++. In Tally, there is provision to access the external functions by uploading the DLLs. In general, the DLLs can be generated using VC++, VB, .Net framework, etc., and can be invoked from TDL. Hence, using TDL, the functions of DLL can be invoked to perform the necessary operations. Why it is required in Tally? In Tally, all functions are not required for all the customers. Only generalized features are included to keep the functionality of Tally simple. But, for some customers, basic Tally may not cater the need. For that, we may need to extend the functionality of Tally by writing programs in TDL. TDL is designed to handle the functions in-built in Tally. For the functions that are not available in Tally, we use DLL, wherein we can include many functions and use it in Tally by calling those functions. How to us...

Types of DLL

When a DLL is loaded in an application, there are two methods of linking, i.e., Load-time Dynamic Linking and Run-time Dynamic Linking. Static Linking happens during program development time, where as dynamic linking happens at run time. Load time Dynamic Linking /Static Linking In Load-time Dynamic Linking, an application makes explicit calls to exported DLL functions like local functions. To use load-time dynamic linking, a header(.h) file and an import library (.lib) file are provided, while compiling and linking the application. Thus, the linker will provide the system with information required to load the DLL and resolve the exported DLL function locations at load time.    Run-time Dynamic Linking /Dynamic Linking Dynamic linking implies the process that Windows uses to link a function call of one module to the actual function in DLL. In Run-time Dynamic Linking, an application calls either the function Load- Library or the function LoadLibr...

Differences between Applications and DLLs

Differences between Applications and DLLs Even though DLLs and applications are both executable program modules, they differ in several ways. To the end user, the most obvious difference is that DLLs are not programs that can be directly executed. From the system's point of view, there are two fundamental differences between applications and DLLs: An application can have multiple instances of itself running in the system simultaneously, whereas a DLL can have only one instance. An application can own things such as a Stack, Global memory, File handles, and a message queue, but a DLL cannot.

Collection Enhancements

Using External Plug-Ins as a Data Source for Collections Introduction : -   A Dynamic Link Library takes the idea of an ordinary library one step further. The idea with a static library is for a set of functions to be collected together, so that a number of different programs could use them. This means that the programmers only have to write code to do a particular task once, and then, they can use the same function in lots of other programs that do similar things. A Dynamic Link Library is similar to a program, but instead of being run by the user to do one thing, it has a lot of functions "exported", so that other programs can call them. There are several advantages of this. First, since there is only one copy of the DLL on any computer used by all the applications that need the library code, each application can be smaller, thus saving disk space. Also, if there is a bug in the DLL, a new DLL can be created and the bug will be fixed in all the programs that u...

‘Multi Objects’ Attribute in TDL

This is a ‘Report’ level attribute which is required to be specified, in case Multiple Objects of the same collection are being added/modified in a Report. It is required specifically in case of multi master creation or alteration. Syntax: MultiObjects: Edit Collection Where, Edit Collection  is the name of the Collection for which modifications are to be done. Example: [Report: Multi Ledger] Multi Objects: Ledger Under MGroup

Collection Enhancements

Collection Attribute ‘WalkEx’ Introduced With every release, performance improvements are being brought, especially with respect to the data gathering and processing artefact ‘Collection’, used to gather and deliver data to presentation  layers. Performance is enhanced drastically if collection is gathered judiciously as per usage. Sometime back, the Collection attribute ‘Keep Source’ had been introduced for performance  enhancement. This was used to retain the source collection gathered once with the specified Interface Object, i.e., either with the current Object or its parents/owners. It drastically improved the performance in scenarios where the same source collection was referred multiple times with in the same Object hierarchy chain. Similarly, there are scenarios where there is Union of multiple collections using the same source collection, and each collection walks over its sub objects across different paths, and computes/ aggregates the values from sub level. In su...

Function - $$RandomNumber IN TDL

A random number is a number generated by a process whose outcome is unpredictable, and which cannot be subsequently reliably reproduced. In other words, Random numbers are numbers that occur in a sequence such that, the values are uniformly distributed over a defined interval and it is impossible to predict future values based on past or present ones. In this release, a new TDL function $$RandomNumber has been introduced to generate Random Numbers. In case of auditing, this can be useful for auditors who would like to pick up some vouchers randomly for authentication. Syntax $$RandomNumber[:MinRange[:MaxRange]] Where, and are optional. In the absence of Max Range, Long Max is considered, i.e., (2^31) - 1 = 2147483647. In the absence of Min Range, ZERO(0) is considered. We can generate random numbers in different ways:  No Parameters : Don’t pass any parameters, i.e., just invoke $$RandomNumber. Default values are assumed. Only with the MinRange Parameter: Here, there i...

Function - $$CaseConvert

the function $$Upper has been used to convert the string expressions to upper case, but there were no functions available for other conversions like Lower case, Title Case, etc. To overcome the difficulty of converting the string to Lower case, Title case, etc., a new function $$CaseConvert has been introduced, to convert the case of the given expression to the specified case format. This function will return a string expression in the converted format This function is very useful when one needs to follow the case rules to display the Name of the company, Name of the bank, etc. Syntax $$CaseConvert : CaseKeyword :Expression Where, CaseKeyword  can be All Capital, Upper Case, All Lower, Lower Case, Small Case, First Upper Case, Title Case, TitleCaseExact, Normal, Proper Case, etc.  * All Capital/UpperCase converts the input expression to upper case.  * All Lower/LowerCase/SmallCase converts the input expression to lower case.  * First Upper Case converts the ...

Action - Trigger Key IN TDL

 When the macro keys are recorded using Key Recording Actions or when they are dumped into the Macros File from the Calculator Pane Command; in order to play them back, one needs to make use of the Action Trigger Key, which sends the list of keys in sequence to the system as if an operator is pressing those Keys. The Keystrokes of a required macro can be copied from Macro Log file and pasted against the ‘Trigger Key’ Action, which triggers all those Keys in sequence as required. Also, Trigger Key accepts a value with Inverted Quotes, which means - trigger this as a value in the current field. For example, V, “Cash”, etc. If the triggered keys enclosed within quotes (“ ”) are executed from a menu, they will be considered as menu keys. For example, “DAS” from Gateway of Tally menu will take the user through Display -> Account Books -> Sales Register. Syntax                  Trigger Key : Comma ...

COM DLL Support in TDL

A dynamic link library (DLL) is an executable file that acts as a shared library of functions. Dynamic linking provides a way for a process to call a function that is not part of its executable code. The executable code for the function is located in a DLL, which contains one or more functions that are compiled, linked, and stored separately from the processes that use them. Multiple applications can simultaneously access the contents of a single copy of a DLL in memory. DLL support has been provided in TDL for quite a while. The focus was primarily on extending Tally for bringing in capabilities which could not be achieved within Tally. ‘CallDLLFunction’ allowed calling native/unmanaged DLLs which were written and compiled in C++. In further releases, this moved a step further where the support was extended to use Plug-In and Activex Plug-In, where the XML output from the DLL could be used as a data source in the collection artefact, and thereby, consumed in TDL. This paved the way f...

Event ‘NatLangQuery’ Introduced

Tally has a natural language processing capability which accepts queries either from the Calculator Pane or from SMS Request. Tally has the intelligence of parsing received/ given commands, in order to process the same. This parsed information is used by the system to process the query and deliver the result. However, in certain cases, queries received might not be understood by the system. There have also been requirements in the market to support data updation queries like Ledger, Voucher Creation, etc In order to cater to the above requirements, a new System Event NatLangQuery has been introduced. This event gives complete control in the hands of the TDL Developer, thereby enabling him to process the query received and do the needful. If the query is ignored by TDL, then the System continues to process it and provide the response as usual. Syntax [System : Event]     Event Name  :  NatLangQuery  : Condition :  Action : Action Parameters Whe...

Action - Unload TDL

To unload the TDL dynamically from the current Tally Session, the Action ‘Unload TDL’ has been introduced. With this Action, the local TDL File(s), including the ones added through Tally.ini and   those added dynamically using Actions ‘Load TDL’ or ‘Execute TDL’, can be unloaded. However, they would be unloaded only for the current Tally Session, and in the subsequent session, all the TDL/TCP files specified in Tally.INI will be loaded once again. Using this action, the Files can be unloaded by specifying either the TDL /TCP file name or the GUID of the TCP File. Syntax UNLOAD TDL : TDL/TCP File Path Expression or GUID Expression Where, TDL/TCP File Path Expression or GUID Expression  evaluates to the path of the TDL/TCP File or GUID of the TCP File to be unloaded dynamically.

System Actions

Action - Load TDL An Action ‘Execute TDL’ was introduced in Release 3.6 to load a TDL dynamically, execute some action, and then unload the TDL or keep it, depending on the Logical Value. With this Action, the TDL would get loaded. However, the execution of action was mandatory. In Release 4.8, an action ‘Load TDL’ has been introduced to load the TDL/TCP dynamically for only the current session of Tally. However, if the TDL File is already loaded due to being specified in Tally.INI, or through previous execution of the Action ‘Load TDL’/‘Execute TDL’, it will not be loaded again. On closing the current session of Tally.ERP 9, the dynamically loaded file(s) will not be available for the subsequent Tally Session. Syntax                         LOAD TDL : TDL/TCP File Path Expression Where, TDL/TCP File Path Expression evaluates to the path of the TDL/TCP File to be loa...

Events in TDL

System Events - for Object Deletion and Cancellation Event Framework has undergone significant changes during the recent past with the introduction of System Events ‘System Start’, ‘System End’, ‘Load Company’, ‘Close Company’ and ‘Timer’. In this Release, four new System Events viz., two Events for Object Deletion and two for Voucher Cancellation, have been introduced. With the introduction of these Events, whenever an Object is subject to Deletion or Cancellation, these events get triggered, which allows the TDL Programmer to take some appropriate action. Only on confirmation of Deletion or Cancellation, these events are triggered. In other words, only when the user confirms the deletion or cancellation of the object by responding with a YES, the relevant events get triggered. Irrespective of the Source of Deletion or Cancellation, i.e., from an external XML Request, Tally User Interface, Remote Tally User Interface, etc., the appropriate events get triggered. Any Object deletio...

Tally Developer 9 Release 5.0 - TDL Enhancement Video

Option Vs Switch

Option: -      In TDL Option is an attribute which can be used by various definitions, to provide a conditional     result in a program. The ‘Option’ attribute can be used in the ‘Menu’, ‘Form’, ‘Part’, ‘Line’, ‘Key’, ‘Field’, ‘Collection’, ‘Import File’ and ‘Import Object’ definitions. Syntax Option : Optional definition :  Logical Condition Where, is the name of a definition, defined as optional definition using the Definition modifier! If the ‘Logical’ value is set to TRUE, then the Optional definition becomes a part of the original definition, and the attributes of the original definition are modified based on this definition. Example: -   If you want to add the option in field the you can use following syntax. [Field : FldMain]      Option : FldFirst : cond1      Option : FldSecond: cond2  The field FldFirst is activated wh...