I want to export a list of stock items (including those having zero closing balance) through XML command. Please help.
Buddy, I think using default reports to get data from tally isn't the best way to integrate with Tally Because Probably parsing that will be unnecessary difficult
That's custom report but gets all fields, If you want only some fields remove Code: <NATIVEMETHOD>*</NATIVEMETHOD> mention required fields in comma deiminated Code: <NATIVEMETHOD>CATEGORY,GUID</NATIVEMETHOD> This will only fetch required fields
I know that Bro, My concern was parsing the XML, It will be unnecessary difficult if we follow this way
We are only fetching what we want and parsing only those fields, What is unnecessary here? What other way you suggest that will be easy?
Supposed You have two response:- 1. <Name>Ledger 1</Name> <Parent>Sundry Debtors</Parent> 2. <SVCurrentLanguage>Ledger 1</SVCurrentLanguage> <SVCurrentLanguage>Sundry Debtors</SVCurrentLanguage> Now, Please tell which is easier one to parse
Obviously 1 Have you tried the request xml provided by me? once try and comment In which way you get response ?
Nope, But I saw you were exporting default reports due to which I thought to show you a bit simpler way to integrate with tally... In which you can structure the XML as per your needs
Because If we use default reports then We have many limitations to fields, We can't add/Remove/Edit Xml tag names.
Hi Vineeth jii, How to XML Request gross profit and loss data in Profit & Loss Report Please Provide possible way, Thank You..!!
Hi, At present I don't have any request xmls for reports(BS,P&L …etc.,) in Tally as I will not use those reports ,I will fetch all data from Tally and create reports dynamically with raw data
And, I Have an another query, i am trying to get the sales register inventry product items but i have only geting first product in each entry. I had tryed below code Please help me to get all product in sales register <ENVELOPE> <HEADER> <VERSION>1</VERSION> <TALLYREQUEST>Export</TALLYREQUEST> <TYPE>Data</TYPE> <ID>All Vouchers</ID> </HEADER> <BODY> <DESC> <STATICVARIABLES> <EXPLODEFLAG>Yes</EXPLODEFLAG> <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT> <SVFROMDATE>${fromDate}</SVFROMDATE> <SVTODATE>${toDate}</SVTODATE> <DBINVEXPLODEFLAG>Yes</DBINVEXPLODEFLAG> </STATICVARIABLES> <TDL> <TDLMESSAGE> <REPORT NAME="All Vouchers"> <FORMS>SalesRegisterGR</FORMS> <TITLE>SalesRegisterGR </TITLE> </REPORT> <FORM NAME="SalesRegisterGR"> <TOPPARTS>SalesRegisterGR, SYNCHeader, RTS SVSRMBody</TOPPARTS> <XMLTAG>"TallyGraphs"</XMLTAG> </FORM> <PART NAME="RTS SVSRMBody"> <TOPPARTS>RTS SVSRMResponse</TOPPARTS> <XMLTAG>"BODY"</XMLTAG> <Vertical>Yes</Vertical> </PART> <PART NAME="RTS SVSRMResponse"> <TOPPARTS>RTS SVSRMData</TOPPARTS> <XMLTAG>"IMPORTDATA"</XMLTAG> <Vertical>Yes</Vertical> </PART> <PART NAME="RTS SVSRMData"> <TOPPARTS>RTS SVSRMTallyMsg</TOPPARTS> <XMLTAG>"REQUESTDATA"</XMLTAG> <Vertical>Yes</Vertical> </PART> <PART NAME="RTS SVSRMTallyMsg"> <TOPLINES>RTS SVSRMMsgs Main</TOPLINES> <REPEAT>RTS SVSRMMsgs Main : RTS SVSendRemoteMsgs</REPEAT> <SCROLLED>Vertical</SCROLLED> </PART> <LINE NAME="RTS SVSRMMsgs Main"> <XMLTAG>"TALLYMESSAGE"</XMLTAG> <XMLAttr>"xmlns:UDF" : "TallyUDF"</XMLAttr> <LINE>RTS SVSRMMsgs</LINE> </LINE> <LINE NAME="RTS SVSRMMsgs"> <Field>Simple Field</Field> <FullObject>Yes</FullObject> </LINE> <PART NAME="SalesRegisterGR"> <TOPLINES>SalesRegister Line Title, SalesRegister Details </TOPLINES> <REPEAT>SalesRegister Details : GetLedgerCollAmt</REPEAT> <SCROLLED>Vertical</SCROLLED> <COMMONBORDERS>Yes</COMMONBORDERS> </PART> <LINE NAME="SalesRegister Line Title"> <USE>SalesRegister Details</USE> <LOCAL>Field : Default : Type : String </LOCAL> <LOCAL>Field : Field PartyLedgerName : Set as: "AmounrtyLedgerName : Set as: "Group Name"</LOCAL> <LOCAL>Field : Field Credit Amountt"</LOCAL> <LOCAL>Field : Field VoucherKey : Set as:$VoucherKey</LOCAL> <LOCAL>Field : Field VoucherNumber : Set as:$VoucherNumber</LOCAL> <LOCAL>Field : Field VoucherTypeName : Set as: "VoucherTypeName"</LOCAL> <LOCAL>Field : Field STKName : Set as:"STKNAME"</LOCAL> <LOCAL>Field : Field STName : Set as:"STNAME"</LOCAL> </LINE> <LINE NAME="SalesRegister Details"> <LEFTFIELDS>PartyLedgerName</LEFTFIELDS> <RIGHTFIELDS>Amount,SalesDate,InvoiceNo,GrossRevenue,VoucherKey,VoucherNumber,Field VoucherTypeName,STKName,STName</RIGHTFIELDS> <XMLTAG>SalesRegister</XMLTAG> </LINE> <FIELD NAME="PartyLedgerName"> <USE>Name Field</USE> <SET>$SalesLedgerName</SET> </FIELD> <FIELD NAME="SalesDate"> <USE>Name Field</USE> <SET>$Date</SET> </FIELD> <FIELD NAME="InvoiceNo"> <USE>Name Field</USE> <SET>$VoucherNumber</SET> </FIELD> <FIELD NAME="Amount"> <USE>Name Field</USE> <SET>$AprAmt</SET> </FIELD> <FIELD NAME="GrossRevenue"> <USE>Name Field</USE> <SET>$GrossRevenue</SET> </FIELD> <FIELD NAME="VoucherKey"> <USE>NUMBER</USE> <SET>$VoucherKey</SET> </FIELD> <FIELD NAME="VoucherNumber"> <USE>NUMBER</USE> <SET>$VoucherNumber</SET> </FIELD> <FIELD NAME="Field VoucherTypeName"> <USE>Name Field</USE> <SET>$VoucherTypeName</SET> </FIELD> <FIELD NAME="STKName"> <USE>Name Field</USE> <SET>$STKINAME</SET> </FIELD> <FIELD NAME="STName"> <USE>Name Field</USE> <SET>$BaseUnits:StockItem:#Stkname</SET> </FIELD> <COLLECTION NAME="AllVoucher" ISMODIFY="No"> <TYPE>Voucher</TYPE> <CHILDOF>$$VchTypeSales</CHILDOF> <BELONGSTO>YES</BELONGSTO> <FETCH>SVFROMDATE,SVTODATE,VoucherNumber,LedgerName,Date,Amount,VoucherTypeName,Date,RATEDETAILS.List,GSTDetails.List,LedgerEntries.List,AllInventoryEntries.List,Ledger Vouchers</FETCH> </COLLECTION> <COLLECTION NAME="GetLedgerCollAmt" ISMODIFY="No"> <SourceCOLLECTION>AllVoucher</SourceCOLLECTION> <By>VoucherNumber : $VoucherNumber</By> <By>Date : $Date</By> <compute>SalesLedgerName :$LedgerName</compute> <compute>GrossRevenue :$GrossRevenue</compute> <compute>VoucherKey :$VoucherKey</compute> <compute>VoucherNumber :$VoucherNumber</compute> <compute>VoucherTypeName :$VoucherTypeName</compute> <compute>AprAmt : $Amount </compute> <AggrCompute>Amount : Sum : $Amount</AggrCompute> <Compute>STKINAME:$Stockitem</Compute> <FILTERS>Filter_IsSales,Filter_DateRange</FILTERS> </COLLECTION> <COLLECTION NAME="RTS SVSendRemoteMsgs"> <TYPE>Voucher</TYPE> <FETCH>*.*</FETCH> <FETCH>LedgerEntries.*</FETCH> <FILTERS>LedgerFilterVal,Filter_IsSales,Filter_DateRange,IsOptionalFilter</FILTERS> </COLLECTION> <SYSTEM TYPE="Formulae" NAME="LedgerFilterVal">$$IsLedOfGrp:$PartyNameExpEXP:$$GroupSundryDebtors</SYSTEM> <SYSTEM TYPE="Formulae" NAME="Filter_DateRange">($Date>=$$Date:##SVFROMDATE) AND ($Date<=$$Date:##SVTODATE)</SYSTEM> <SYSTEM TYPE="Formulae" NAME="Filter_IsSales">($$IsSales:$VoucherTypeName)</SYSTEM> <SYSTEM TYPE="Formulae" NAME="IsOptionalFilter">NOT $IsOptional</SYSTEM> </TDLMESSAGE> </TDL> </DESC> </BODY> </ENVELOPE>
this is also a problem with saying use custom reports you are trying re-invent the wheel We can achieve what we want with native reports provided by Tally easily with minimum payload If I want to fetch Sales Register I simply use Code: <ENVELOPE> <HEADER> <VERSION>1</VERSION> <TALLYREQUEST>Export</TALLYREQUEST> <TYPE>Collection</TYPE> <ID>CusSalesVouchers</ID> </HEADER> <BODY> <DESC> <STATICVARIABLES> <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT> <!-- * Supports only xml format --> <SVViewName>Accounting Voucher View</SVViewName> <SVFROMDATE>{{Fromdate}}</SVFROMDATE> <SVTODATE TYPE="Date">{{ToDate}}</SVTODATE> </STATICVARIABLES> <TDL> <TDLMESSAGE> <COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="CusSalesVouchers"> <TYPE>Vouchers</TYPE> <!--Replace Sales with ledgername you want to search --> <Childof>$$VchTypeSales</Childof> <BELONGSTO>YES</BELONGSTO> <NATIVEMETHOD>*</NATIVEMETHOD> </COLLECTION> </TDLMESSAGE> </TDL> </DESC> </BODY> </ENVELOPE> If you ask me how I will parse such complex structure I written a library in c# for that - TallyConnector that makes connecting with Tally easily, In that library I will use a generic function that parses all types of tally objects xml.
Thank you for your reply. Could you please tell me how to use this in Xml ?? 1. $$loopObjCall 2.For In(FOR IN : <Iterator Var Name> : <List Var Name> . . END FOR) 3. ListValue ($$ListValue : <List Var Name> : <Key Formula>) And how to add salesman menu inside the Outstanding report????
To use Tally Functions in XML you need to wrap it inside LOCALFORMULA For example to use If else Code: <LOCALFORMULA>PlanName: If $$LicenseInfo:IsEducationalMode Then "Educational Version" ELSE If $$LicenseInfo:IsSilver Then "Silver" ELSE If $$LicenseInfo:IsGold Then "Gold" else ""</LOCALFORMULA>
Hi sir, This TDl code how to Export xml format [Function: for Each within Function] List Variable : GroupName : String 00 : CALL : For Each List Fill 10 : LIST VALUE SORT : GroupName : Yes : Logical 20 : CALL : For Each List Print : "Value - String - Ascending" [Function: For Each List Fill] Variable : Count : Number 00 : SET : Count : 1 10 : WALK COLLECTION : My Group 20 : LIST ADD : GroupName : ##Count : $Name 30 : INCREMENT: Count 40 : END WALK [Function: For Each List Print] Parameter : SortTypeString : String 00 : SET FILE LOG ON 10 : LOG : "---" + ##SortTypeString + "---" 20 : FOR EACH : KeyVar : GroupName 30 : LOG : "Key: " + $$String:##KeyVar + " Value: " + $$ListValue:GroupName:##KeyVar 40 : END FOR 50 : LOG : "-----------------------------------------------" 60 : SET FILE LOG OFF [Collection: MyGroup] Type : Group Child Of : $$GroupCurrentAssets BelongsTo : Yes Fetch : Name I Understand this TDL code, but unable to convert xml format Please help..!!
If you have Tally developer License ,You can convert TDL to xml by right clicking TDL and convert to xml TDL Since I don't have Developer License I cannot do it
I am not TDL developer so I don't have all those But I am sure Someone already shared in this website you can find by searching