Automatic printer selection based on voucher type

Discussion in 'Tally.ERP 9' started by Parag, Apr 25, 2021.

    
Tags:
  1. Parag

    Parag New Member


    Dear Experts,

    Need help on the below Scenario -
    3 computers A B & C
    3 printers A B & C
    3 voucher types
    Sales Cash - Prints to be taken from Printer A
    Sales Credit - Prints to be taken from Printer B
    Sales POS - Prints to be taken from Printer C

    Printer B & C are connected to Computer A via network/LAN
    Printer A & C are connected to Computer B via network/LAN
    Printer A & B are connected to Computer C via network/LAN

    Using the below condition i've set the preferred printer on respective voucher type

    [Report:InfosoftInvPrint]
    Use: GST InvoiceAnalysis Report_Variables
    Form: InfosoftInvPrint
    Object: Voucher
    PrintSet : SVPrinterName : if ##SVVoucherType ="Sales-Cash" then "\\Mukesh2\HP Laser Jet Pro M501 PCL 6" or "HP Laser Jet Pro M501 PCL 6"+
    Else if ##SVVoucherType ="Sales-Credit" then "\\Mukesh2\HP LaserJet Pro MFP M125-M126 PCLmS" or "HP LaserJet Pro MFP M125-M126 PCLmS" +
    Else if ##SVVoucherType ="Sales-POS" then "\\Mukesh2\POS80 10.0.0.11" or "POS80 10.0.0.11" Else ""

    Issue I am facing -
    Since a printer A is connected directly to Computer A but on network with computer B & C - the printer path used for selection changes
    Tally goes into NOT responding

    Please help.
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Your condition is wrong.........

    Do it like this.............
    If NOT ComputerA and ##SVVoucherType ="Sales-Cash" Then "\\Mukesh2\HP Laser Jet Pro M501 PCL 6" Else
    If Computer-A and ##SVVoucherType ="Sales-Cash" Then "HP Laser Jet Pro M501 PCL 6" Else ..... and so on
     


Share This Page