Hello Everyone, I have configured printer settings with Tally, and I am able to print "Sales Invoice" from Tally. But Now I am creating "Sales Invoice" from my C# application and want to print "Sales Invoice" from C# application. How I can send print action to Tally using XML request to print specific Sales Invoice Voucher in Tally ? Thanks in Advance !!!
Hello All, I have able to print specific voucher. Now I want to use PDF Printer and save file automatically with some file name at specified location. Please guide me through it. Using this, I want to send PDF voucher to customer through EMail. Thanks in advance
Sorry but, i am not succeed yet in it. I will update the details here once i am done on it. Thank you for interest in it.
thank you Bhushan, please update me once you found solution. will the below link helpful? http://tdlexpert.com/index.php?threads/export-pdf-using-xml-soap-request-using-vb6.2552/
for exporting balance sheet, send a request like this : Code: <ENVELOPE> <HEADER> <VERSION>1</VERSION> <TALLYREQUEST>Export</TALLYREQUEST> <TYPE>Data</TYPE> <ID>HostController</ID> </HEADER> <BODY> <DESC> <STATICVARIABLES> <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT> </STATICVARIABLES> <TDL> <TDLMESSAGE> <REPORT Name="HostController"> <FORM>HostController</FORM> </REPORT> <FORM Name="HostController"> <PART>HostController</PART> </FORM> <PART Name="HostController"> <LINE>HostController</LINE> <SCROLLED>Vertical</SCROLLED> </PART> <LINE Name="HostController"> <FIELD>NameField</FIELD> <LOCAL>Field:Name Field:setas:$$TriggerReportExport</LOCAL> </LINE> <FUNCTION Name="TriggerReportExport"> <ACTION>02:SET:SvExportFormat:$$SysName:PDF</ACTION> <ACTION>03:SET:SvPrintFileName:$$MakeExportName:"Balance Sheet":##SvExportFormat</ACTION> <ACTION>04:SET:SVOpenFileAfterExport:No</ACTION> <ACTION>05:EXPORT REPORT:Balance Sheet:True</ACTION> <ACTION>06:Return:"Process Completed"</ACTION> </FUNCTION> </TDLMESSAGE> </TDL> </DESC> </BODY> </ENVELOPE> hope it will be helpful for you All the Best.
Hi Teja, Really thanks for Sharing the Code snipped. It worked well. with modifying as "EXPORT REPORT:Balance Sheet: TRUE" I am new to TDL and i am struggling to export a single sales voucher / Invoice as PDF using filter and voucher number. please help me to export as PDF through XML Request.
Yeah i forgot to add true parameter for export action Thanks for pointing out Export single invoice invoice via xml request is a bit hard , let me try that one , i will update the status
To export the invoice: Code: <ENVELOPE> <HEADER> <VERSION>1</VERSION> <TALLYREQUEST>Export</TALLYREQUEST> <TYPE>Data</TYPE> <ID>HostController</ID> </HEADER> <BODY> <DESC> <STATICVARIABLES> <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT> </STATICVARIABLES> <TDL> <TDLMESSAGE> <REPORT Name="HostController"> <FORM>HostController</FORM> </REPORT> <FORM Name="HostController"> <PART>HostController</PART> </FORM> <PART Name="HostController"> <LINE>HostController</LINE> <SCROLLED>Vertical</SCROLLED> </PART> <LINE Name="HostController"> <FIELD>NameField</FIELD> <LOCAL>Field:Name Field:setas:$$TriggerReportExport</LOCAL> </LINE> <FUNCTION Name="TriggerReportExport"> <ACTION>02:SET:SvExportFormat:$$SysName:PDF</ACTION> <ACTION>03:SET:SvPrintFileName:$$MakeExportName:"Invoice":##SvExportFormat</ACTION> <ACTION>04:SET:SVOpenFileAfterExport:No</ACTION> <ACTION>05:EXPORT REPORT:TargetInvoice:True</ACTION> <ACTION>06:Return:"Process Completed"</ACTION> </FUNCTION> <REPORT Name="TargetInvoice"> <OBJECT>Voucher:"ID:2"</OBJECT> <TITLE>Invoice</TITLE> <USE>Voucher</USE> <FORM>Printed Invoice</FORM> </REPORT> </TDLMESSAGE> </TDL> </DESC> </BODY> </ENVELOPE> you have to replace id <OBJECT>Voucher:"ID:2"</OBJECT> with master id of the voucher you want to export it is for sales voucher, for other voucher types you have to change the form name <FORM>Printed Invoice</FORM> to get respective print format
Dear Teja, Really Appreciate your efforts in sharing this code and helping others from your schedule. I am getting an error while executing the XML request. Could you help me with that? Attached the screenshot of the error.
Dear Teja, Thanks for your support. The Manual Export works fine from Tally. Only when sending XML Request the Error Occurs. I tried Uninstall and reInstalled Tally 9 erp still the error persists. If you could give me any debugging steps or any custom TDL for this Export i can try and resolve the issue.
Code: <ENVELOPE> <HEADER> <VERSION>1</VERSION> <TALLYREQUEST>Export</TALLYREQUEST> <TYPE>Data</TYPE> <ID>HostController</ID> </HEADER> <BODY> <DESC> <STATICVARIABLES> <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT> </STATICVARIABLES> <TDL> <TDLMESSAGE> <REPORT Name="HostController"> <FORM>HostController</FORM> </REPORT> <FORM Name="HostController"> <PART>HostController</PART> </FORM> <PART Name="HostController"> <LINE>HostController</LINE> <SCROLLED>Vertical</SCROLLED> </PART> <LINE Name="HostController"> <FIELD>NameField</FIELD> <LOCAL>Field:Name Field:setas:$$TriggerReportExport</LOCAL> </LINE> <FUNCTION Name="TriggerReportExport"> <ACTION>02:SET:SvExportFormat:$$SysName:PDF</ACTION> <ACTION>03:SET:SvPrintFileName:$$MakeExportName:"Pay slip":##SvExportFormat</ACTION> <ACTION>04:SET:SVOpenFileAfterExport:No</ACTION> <ACTION>05:EXPORT REPORT:Pay Slip:True</ACTION> <ACTION>06:Return:"Process Completed"</ACTION> </FUNCTION> </TDLMESSAGE> </TDL> </DESC> </BODY> </ENVELOPE> ****************************************************** Hello Sir i used above code to download payslip from tally but i can able download pay slip template only because i am not able to pass the particular employee name or id ,plz suggest me how to pass employee id.