Export Voucher as PDF by XML Request

Discussion in 'Tally Developer' started by SURANJIT DUTTA, Sep 11, 2021.

    
  1. SURANJIT DUTTA

    SURANJIT DUTTA New Member


    Code by: teja varma
    Ref Thread: http://tdlexpert.com/index.php?threads/send-print-action-to-tally-using-xml-request.5091/



    <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>

    I want to get a pdf export of my voucher. This code works with some issues. The exported pdf does prints the company details, customer details, and item details but GST details, Total Quantity, Total Amount, etc does not get printed.

    Export From Tally:
    LINK: https://drive.google.com/file/d/1KUPP5vmw1lRjTFLu3sKNOGqE78nHx4TG/view?usp=sharing

    [​IMG]
    [​IMG]
    Export From XML Request:
    LINK: https://drive.google.com/file/d/1xWvdISdJ44P1o2qMixRI49XXFEowMPmD/view?usp=sharing
    [​IMG]
    [​IMG]
    Please help me fix this issue and I am very new to XML integrations.
     
    Last edited: Sep 11, 2021


  2. Sai Vineeth

    Sai Vineeth Active Member


    What Id you are mentioning in this Tag??
    Code:
    <OBJECT>Voucher:"ID:2"</OBJECT>
     


  3. SURANJIT DUTTA

    SURANJIT DUTTA New Member


    Voucher:"ID:MASTER_ID"
    Eg: Voucher:"ID:56524"
     


Share This Page