How to Print UDF in Sales Report

Discussion in 'Free Source Codes' started by Hem Singh, Oct 22, 2018.

    
  1. Hem Singh

    Hem Singh New Member


    Hello Sir

    Greeting of the day

    Please check my TDL Code

    SHTLedAadharNo value not print in Sales Register col

    ;; Shri Ganesha Namo



    [#Part :LedOtherDetails]


    Add : Line : SHTLedAadharNo

    [Line : SHTLedAadharNo]
    Fields : Short Prompt, SHTLedAadharNo
    Local : Field : Short Prompt : Setas : "Customer Id Proof:"
    Local: Field: Short Prompt : Width: 4.4 cm

    [Field : SHTLedAadharNo]
    Use : name Field
    Setas : $SHTLedAadharNo
    Storage : SHTLedAadharNo


    [system : udf]
    SHTLedAadharNo : string : 100



    [#Menu : Gateway of Tally]
    Item : Voucher Report : Display : SHTSalesReport

    [Report: SHTSalesReport]

    Form : SHTSalesReport
    ;Repeat : SVCurrentCompany ;;;The repeat variables can hold multiple value of the same type. These values can be accessed via an implicit index framework from the field, when field is repeated. Repeat variables are supported only in report scope for the purpose of the column reports. These variables can be filled using a collection and method specification in the variable.
    Variable : SVFromDate,SVToDate
    Set : SVFromDate :$$MonthStart:##SVCurrentDate ;$$MonthStart:##SVCurrentDate
    Set : SVToDate : $$Date:##SVCurrentDate ;$$MonthEnd:##SVCurrentDate


    [Form: SHTSalesReport]

    Parts : SHTSalesReport
    Width: 100 Screen

    [Part: SHTSalesReport]

    Lines :SHTSalesReportTitle, SHTSalesReportDetails
    Repeat : SHTSalesReportDetails : SHTSalesReportCollection,PartyDetails ;;;Line repeat on Ledger collections
    Scroll : Vertical
    Common Border : Yes

    [Line: SHTSalesReportTitle]

    Use : SHTSalesReportDetails
    Local : Field : Default : Type : String
    Local : Field : Default : Align : Center

    Local : Field : VoucherNo : Set As: "V.No."
    Local : Field : VoucherDate : Set As: "Date"
    Local : Field : PartyName : Set As: "Pary Name"
    Local : Field : VoucherType : Set As: "V Type"
    Local : Field : ParyUDF : Set As: "UDF"
    Local : Field : VoucherAmt : Set As: "Bill Amount" ;;;Field will be set with the current company name
    Border : Thin Top Bottom

    [Line: SHTSalesReportDetails]

    Fields : VoucherNo,VoucherDate,PartyName,VoucherType,ParyUDF, VoucherAmt
    ;Repeat : PartyClosing ;;;repeat the field as new columns in report

    [Field: VoucherNo]

    Use : Name Field
    Set As : $VoucherNumber ;;;set the V No. in the field

    [Field: VoucherDate]

    Use : Name Field
    Set As : $Date ;;;set the V date in the field
    [Field: PartyName]

    Use : Name Field
    Set As : $LedgerName ;;;set the ledger name in the field
    [Field: VoucherType]

    Use : Name Field
    Set As : $VoucherTypeName ;;;set the V Type in the field

    [Field: ParyUDF]

    Use : Name Field
    Set As : $SHTLedAadharNo ;;;set the ledger UDF in the field

    [Field: VoucherAmt]

    Use : Amount Forex Field
    Set As : $Amount ;;;set the closing value in the field
    Border : Thin Left

    [Collection: SHTSalesReportCollection]

    ; Type : Ledger ;Vouchers
    ; Fetch : Name, SHTLedAadharNo,ClosingBalance,VoucherTypeName
    ; ;Fetch : Date,Amount,VoucherTypeName ,PArtyLedgerName,VoucherNumber,Createdt
    Type : Vouchers
    Fetch : Date,Amount,VoucherTypeName ,PArtyLedgerName,VoucherNumber,Createdt,LedgerEntries.*,Ledger.SHTLedAadharNo
    ;Filter:VoucherTypeName=$$IsSales:

    [Collection:partyDetails]
    Type : Ledger
    ;Belongs To: Yes
    Fetch : Name,Parent,Address
    Filter : CurrSalesInvoiceVchFilter

    [System:formulae]
    CurrSalesInvoiceVchFilter : $Name=$PArtyLedgerName
     


  2. sattam

    sattam Active Member


    [Field: ParyUDF]

    Use : Name Field
    Set As : $SHTLedAadharNo:Ledger:$PartyLedgerName;;;set the ledger UDF in the field
     


  3. NSA

    NSA Member


    Sir,

    How to Fetch the UDF Value in a Voucher to SUB form of the same voucher?
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    use it in fullform ...........e.g. myUDF:Ledger:$LedgerName OR myUDF:Ledger:#FieldName
     


  5. NSA

    NSA Member


    Sir this filed is actually associated toVCH Suppl DespatchOrderDetails. So should I frame like this??

    MyUdf:Voucher:UDFFieldName or MyUDF:VCHSupplDespatchOrderDetails:#UDFFieldName
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Show screenshot with markings.........so i understand......
     


  7. NSA

    NSA Member


    Based on the Mode of Payment I am trying to Constrain a formula to Determine A field Value in VCH BatchAllocations
     

    Attached Files:



  8. NSA

    NSA Member


    [#Object : Voucher]
    VchPaymntMode: $PymntMode

    [UDF Desired Field]
    Set As: $VchPaymntMode

    You mean like this?
     


  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Ignore above....
    Simple --- SET AS : $udfvalue will work.
     


Share This Page