Not Getting collection value from Table

Discussion in 'Tally Developer' started by ujwlgrg, Aug 26, 2021.

    
  1. ujwlgrg

    ujwlgrg Member


    Hello everyone,
    I have created a report on which I can get the sales list of selected party (by adding button of select party)
    By currently, i m getting the list of all the sales entry available in my data.

    I want to make changes in my collection so that it will show the entries of the selected party only.

    Thank you in advance

    my code :

    Code:
    [#Menu: Gateway of Tally]
    
    Item : Party Details: Display : UReport
    
    [Report: UReport]
        Form : UForm
        Title: "Party Details"
    
    [Form: UForm]
        Parts : title, UPart
        Width: 100% page
        Button:explode flag, Select Party
    
    [Part : UPart]
        Lines : ULine,
        Repeat:uline:voucher
        Scroll:Vertical
        Vertical:Yes
        Common Border:Yes
       
    [Part:title]
        Line:title
       
    [Line:title]
        Fields : UField, party, amount, VchTyp
        Local:Field:Ufield:Set as:"Voucher Number"
        Local:Field:Party:Set as:"Party Name"
        Local:Field:Amount:Use:Name field
        Local:Field:Amount:Set as:"Amount"
        Local:Field:VchTyp:Set as:"Voucher Type"
        Border:Column Titles
               
    [Line : ULine]
        Fields : UField, party, amount, VchTyp
        Explode:inventory: ##explodeflag or $$KeyExplode
    
    [Field : UField]
        Use:name field
        Set as : $vouchernumber
        Border:thin right
       
    [Field:party]
        Use:name field
        Set as:$partyledgername
        Border:thin right
       
    [Field:amount]
        use:amount field
        Set as:$amount
        Border:thin right
    
    [Field:VchTyp]
        Use:name field
        Set as: $vouchertypename
        Border:thin right
    
    [Part:inventory]
        Line:inv
        Repeat:inv: inventory entries
       
    [Line:inv]
        Field:inv, qty, rate
       
    [Field:inv]
        Use:name field
        Set as: $stockitemname
    
    [Field:qty]
        Use:name field
        Set as: $BilledQty
    
    [Field:rate]
        Use:Rate field
        Set as: $rate
    
    [Collection:voucher]
        Type:vouchers:vouchertype
        Child Of: $$VchTypeSales
        Belongs To:Yes
        Fetch:partyledgername, amount, vouchertypename, ledger
    
    ;;-----------------------------------------------------------------
    
    [Button: SELECT PARTY]
        Key: ALT + S
        Action: Alter: SParty
    
    [Report: SParty]
        Form : SParty
        Title: "Sundry Debtor Detalis"
    
        [Form: SParty]
            Parts : SParty
    
            [Part : SParty]
                Lines : LINEB
                           
                [Line:LINEB]
                    Field:Name, Group, clbal
    
                    [Field : Name]
                        Use:name field
                        Table:table
                        Show Table:On First Key
    
                    [Field:Group]
                        Use:name field
                        Set as:$parent:Ledger:#Name
                        Skip:Yes
       
                    [Field:clbal]
                        Use:Name field
                        Set as:$ClosingBalance:Ledger:#Name
                        Skip:Yes
    
    [Collection:table]
        Title: "ledger list"
        Type:ledger
        Child Of: sundry debtors
        Format: $name, 25
        Format: $parent, 20
        Format: $closingbalance, 15
        Sub Title:"ledgers"
        Sub Title:"gorup"
        Sub Title:"closing blalance"
     


  2. NITIN KUMAR JAIN

    NITIN KUMAR JAIN New Member


    [#Menu: Gateway of Tally]

    Item : Party Details: Display : UReport

    [Report: UReport]
    Form : UForm
    Title: "Party Details"
    Local : Collection : voucher : Add : Filters : Party Filter

    [Form: UForm]
    Parts : title, UPart
    Width: 100% page
    Button:explode flag, Select Party

    [Part : UPart]
    Lines : ULine,
    Repeat:uline:voucher
    Scroll:Vertical
    Vertical:Yes
    Common Border:Yes

    [Part:title]
    Line:title

    [Line:title]
    Fields : UField, party, amount, VchTyp
    Local:Field:Ufield:Set as:"Voucher Number"
    Local:Field:party:Set as:"Party Name"
    Local:Field:Amount:Use:Name field
    Local:Field:Amount:Set as:"Amount"
    Local:Field:VchTyp:Set as:"Voucher Type"
    Border:Column Titles

    [Line : ULine]
    Fields : UField, party, amount, VchTyp
    Explode:inventory: ##explodeflag or $$KeyExplode

    [Field : UField]
    Use:name field
    Set as : $vouchernumber
    Border:thin right

    [Field:party]
    Use:name field
    Set as:$partyledgername
    Border:thin right

    [Field:amount]
    use:amount field
    Set as:$amount
    Border:thin right

    [Field:VchTyp]
    Use:name field
    Set as: $vouchertypename
    Border:thin right

    [Part:inventory]
    Line:inv
    Repeat:inv: inventory entries

    [Line:inv]
    Field:inv, qty, rate

    [Field:inv]
    Use:name field
    Set as: $stockitemname

    [Field:qty]
    Use:name field
    Set as: $BilledQty

    [Field:rate]
    Use:Rate field
    Set as: $rate

    [Collection:voucher]
    Type:vouchers:vouchertype
    Child Of: $$VchTypeSales
    Belongs To:Yes
    Fetch:partyledgername, amount, vouchertypename, ledger


    [System: Formula]
    Party Filter :$partyledgername CONTAINS ##party

    [System: Variable]
    party: ""

    [Variable:party]
    Type : String
    Default : ""
    Persistent : Yes


    ;;-----------------------------------------------------------------

    [Button: SELECT PARTY]
    Key: ALT + S
    Action: Alter: SParty

    [Report: SParty]
    Form : SParty
    Title: "Sundry Debtor Detalis"

    [Form: SParty]
    Part : SParty
    Full Width : No
    Space Right : 2
    Space Left : 2
    Option : Small Size Form
    Background : @@SV_CMPCONFIG
    On: Form Accept : Yes : Form Accept
    On: Form Accept : Yes : Display : UReport

    [Part: SParty]
    Line : SParty

    [Line: SParty]
    Fields : Medium Prompt, SParty;, vaibhfield
    Local: Field: Medium Prompt : Set As : "Select Party"


    [Field: SParty]
    Use: Name Field
    Table: table
    Show Table: Always
    Modifies : party : Yes


    [Collection:table]
    Title: "ledger list"
    Type:ledger
    Child Of: sundry debtors
    Format: $name, 25
    Format: $parent, 20
    Format: $closingbalance, 15
    Sub Title:"ledgers"
    Sub Title:"gorup"
    Sub Title:"closing blalance"
     


  3. NITIN KUMAR JAIN

    NITIN KUMAR JAIN New Member


    This is Corrected code
     
    bharat shah likes this.


  4. ujwlgrg

    ujwlgrg Member


    Thank you so much sir for correcting this code. :D:D
    Sir, can you also help in proving the option by which I can get the list of all voucher entries again without closing the report.
     


  5. NITIN KUMAR JAIN

    NITIN KUMAR JAIN New Member


    [#Menu: Gateway of Tally]

    Item : Party Details: Display : UReport

    [Report: UReport]
    Form : UForm
    Title: "Party Details"
    Local : Collection : voucher : Add : Filters : Party Filter

    [Form: UForm]
    Parts : title, UPart
    Width: 100% page
    Button:explode flag, Select Party, SELECT VoucherType

    [Part : UPart]
    Lines : ULine,
    Repeat:uline:voucher
    Scroll:Vertical
    Vertical:Yes
    Common Border:Yes

    [Part:title]
    Line:title

    [Line:title]
    Fields : UField, party, amount, VchTyp
    Local:Field:Ufield:Set as:"Voucher Number"
    Local:Field:party:Set as:"Party Name"
    Local:Field:Amount:Use:Name field
    Local:Field:Amount:Set as:"Amount"
    Local:Field:VchTyp:Set as:"Voucher Type"
    Border:Column Titles

    [Line : ULine]
    Fields : UField, party, amount, VchTyp
    Explode:inventory: ##explodeflag or $$KeyExplode

    [Field : UField]
    Use:name field
    Set as : $vouchernumber
    Border:thin right

    [Field:party]
    Use:name field
    Set as:$partyledgername
    Border:thin right

    [Field:amount]
    use:amount field
    Set as:$amount
    Border:thin right

    [Field:VchTyp]
    Use:name field
    Set as: $vouchertypename
    Border:thin right

    [Part:inventory]
    Line:inv
    Repeat:inv: inventory entries

    [Line:inv]
    Field:inv, qty, rate

    [Field:inv]
    Use:name field
    Set as: $stockitemname

    [Field:qty]
    Use:name field
    Set as: $BilledQty

    [Field:rate]
    Use:Rate field
    Set as: $rate

    [Collection:voucher]
    Type:vouchers
    Belongs To:Yes
    Filter: voucher filter
    Fetch:partyledgername, amount, vouchertypename, ledger


    [System: Formula]
    Party Filter :$partyledgername CONTAINS ##party
    voucher filter : $vouchertypename = ##voucher ; All Items

    [System: Variable]
    party: ""
    voucher: ""

    [Variable:party]
    Type : String
    Default : ""
    Persistent : Yes

    [Variable:voucher]
    Type : String
    Default : ""
    Persistent : Yes



    ;;-----------------------------------------------------------------

    [Button: SELECT PARTY]
    Key: ALT + S
    Action: Alter: SParty

    [Report: SParty]
    Form : SParty
    Title: "Sundry Debtor Detalis"

    [Form: SParty]
    Part : SParty
    Full Width : No
    Space Right : 2
    Space Left : 2
    Option : Small Size Form
    Background : @@SV_CMPCONFIG
    On: Form Accept : Yes : Form Accept
    On: Form Accept : Yes : Display : UReport

    [Part: SParty]
    Line : SParty

    [Line: SParty]
    Fields : Medium Prompt, SParty;, vaibhfield
    Local: Field: Medium Prompt : Set As : "Select Party"


    [Field: SParty]
    Use: Name Field
    Table: PartyList
    Show Table: Always
    Modifies : party : Yes


    [Collection:partyList]
    Title: "Party List"
    Type:ledger
    Child Of: sundry debtors
    Format: $name, 25
    Format: $parent, 20
    Format: $closingbalance, 15
    Sub Title:"ledgers"
    Sub Title:"gorup"
    Sub Title:"closing blalance"



    ;;-----------------------------------------------------------------

    [Button: SELECT VoucherType]
    Key: ALT + V
    Action: Alter: SVoucher

    [Report: SVoucher]
    Form : SVoucher
    Title: "Select Voucher Type"

    [Form: SVoucher]
    Part : SVoucher
    Full Width : No
    Space Right : 2
    Space Left : 2
    Option : Small Size Form
    Background : @@SV_CMPCONFIG
    On: Form Accept : Yes : Form Accept
    On: Form Accept : Yes : Display : UReport

    [Part: SVoucher]
    Line : SVoucher

    [Line: SVoucher]
    Fields : Medium Prompt, SVoucher;, vaibhfield
    Local: Field: Medium Prompt : Set As : "Select Voucher Type"


    [Field: SVoucher]
    Use: Name Field
    Table: VoucherTypeList
    Show Table: Always
    Modifies : voucher : Yes


    [Collection:VoucherTypeList]
    Title : $$LocaleString:"List of Voucher Types"
    Align : Right
    FullHeight : Yes
    Type : Voucher Type
    Add: Collection: All Items
     


  6. ujwlgrg

    ujwlgrg Member


    its not working in y tally
     


Share This Page