How To Sorting Date Wise

Discussion in 'Free Source Codes' started by Sanjay preethi, Apr 4, 2021.

    

  1. Any One Help Me...

    ;;;;;;;;;;;My Code Below;;;;;


    [#Menu:Gateway of Tally]
    Add: Key Item: At End: Partywise Last Receipt Date Report : Y : Display Collection : TravelImpLedgerColl
    [Button: MyVoucherTypeBook]

    Title : "Report"
    Key : F5
    Action : Display Collection : TravelImpLedgerColl

    [Collection:TravelImpLedgerColl]

    Title : "List of Groups"
    Type : Group
    Align : Center
    Format : $Name , 25
    Format : $Parent, 15
    Format : $OpeningBalance, 10
    Format : $ClosingBalance, 12
    Sub Title : "Group Name", " Parent", "Open. Balance","Closing Balance"
    Trigger : TrigerGrpItemColl
    Variable : VarGrpItem ;; to bridge between collection and display report
    Report : DisplayGrpItem
    Filter : GrpFilter

    [Report:TrigerGrpItemColl]

    Form:TrigerGrpItemColl
    Title: "Select Stock Item Name"

    [Form:TrigerGrpItemColl]

    Part:TrigerGrpItemColl
    Vertical Align : Top
    Horizontal Align : Center

    [Part:TrigerGrpItemColl]

    Line:TrigerGrpItemColl

    [Line:TrigerGrpItemColl]

    Field:TrigerGrpItemColl

    [Field:TrigerGrpItemColl]

    Table : TravelImpLedgerColl
    Modifies : VarGrpItem
    Show Table : Always ;;show the table always
    Width : 45
    Max : 256 ;;Allows to type 50 charactor, by defualt it is only 1 charactor

    [Report:DisplayGrpItem]

    Form : DisplayGrpItem

    Title : "Ledger Under : " + ##VarGrpItem
    Variable : SVFromDate, SVToDate,
    Set : SVfromDate : $$YearOfDate:##SvCurrentdate ;$$Monthstart:##SvCurrentdate
    Variable : IsMultiPage, InNewPages,
    Set : IsMultiPage : yes
    Set : InNewPages : yes
    Set : SVToDate : ##SVCurrentdate


    [Form:DisplayGrpItem]
    Use : DSP Template
    Part : HeadingPart, DisplayGrpItem, DevBottPart
    Width : 100% screen
    Height : 100% screen


    [Part: HeadingPart]
    Line : HeadingPart


    [Line:HeadingPart]
    Field:HeadingPart

    [Field:HeadingPart]

    Use : Name field
    Set as : $$LocaleString:"Statement for the period: from " + $$String:##SVFromDate + " to " + $$String:##SVToDate
    Align : Center
    Full Width : Yes
    Local : Style : Defualt : Height : 20
    Color : Black
    Style : large bold
    Background : Light Surf Green

    [Part:DevBottPart]
    Line:DevBottPart
    Background: Dark Green

    [Line:DevBottPart]
    Field:DevBottPart

    [Field:DevBottPart]
    Info : ""
    Align : Center
    Full Width : Yes
    Local : Style :Defualt :Height :20
    Color : Black
    Style : Tiny Small ;Small Prompt;large bold
    Background : Light Surf Green;Light Sea Green;CalcBGClr
    ;Border : Thin Top
    Invisible : NOT ($$InPrintMode OR $$InExportMode OR $$InMailAction) OR ($$InCreateMode OR $$InAlterMode)
    Invisible : ($$InPrintMode OR $$InExportMode OR $$InMailAction) OR ($$InCreateMode OR $$InAlterMode)


    [Part:DisplayGrpItem]
    Line : DisplayGrpItemTitle,DisplayGrpItem
    Repeat : DisplayGrpItem : MyLedgerColl
    Scroll : Vertical
    Common Border : Yes

    [Line:DisplayGrpItemTitle]
    Field : DisplayGrpItem
    Right Field :DisplayGrpItemLastBillDate

    Local : Field : DisplayGrpItem : Info: "Ledger Name"
    Local : Field : DisplayGrpItemLastBillDate : Info: "Last Rcpt. Date"
    Local : Field : Default : Style : Normal Bold
    Local : Field : Default : Line : 0
    Local : Field : Default : Align : Center
    Border : Thick Top Bottom


    [Line:DisplayGrpItem]
    Field : DisplayGrpItem
    Right Field : DisplayGrpItemLastBillDate

    [Field:DisplayGrpItem]
    Use : Name Field
    Set as : $Name
    Width : 35
    Border : Thin Left

    [Field:DisplayGrpItemLastBillDate]
    Use : Uni Date Field
    Set as : $$CollectionField:$Date:1:AllJourVchrs
    Border : Thin Left Right
    Width : 12



    [Collection:MyLedgerColl]
    Type : Ledger
    Filter : MyLedFilter
    Fetch : VoucherTypeName, MyRecdatewisesort,*.*
    Sort :mad:@Default : ##DisplayGrpItemLastBillDate

    [System:Formula]
    MyRecdatewisesort:$$CollectionField:$Date:1:AllJourVchrs
    VchNoNumericIncrTest : $$TDLSysName:SORT_VchNoNumericInc

    [Collection:AllVchrsSrc]
    Type : Vouchers : Ledger
    Child Of : #DisplayGrpItem
    Belongs To : Yes
    Fetch : Amount, Date, VoucherTypeName

    [Collection:AllJourVchrs]
    Source Collection : AllVchrsSrc
    Walk : LedgerEntries
    Compute : Date : $$Owner:$Date
    Compute : VoucherTypeName : $$Owner:$VoucherTypeName
    Compute : LedgerName : $LedgerName
    Compute : Amount : $Amount
    Sort : Default : -$Date
    Filter : MyRecEntry

    [Variable:VarGrpItem]
    Type:String

    [System: Variables]
    VarGrpItem : ""


    [System: Formulae]
    MyLedFilter : $ClosingBalance > 0 AND $Parent = ##VarGrpItem

    MyRecEntry : $$IsReceipt:$VoucherTypeName AND $LedgerName = #DisplayGrpItem ;OR $$IsReceipt:$VoucherTypeName )

    GrpFilter : $Name Contains "Sundry Debtors"
     

    Attached Files:



  2. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Sort: @@Default: $Date
     



  3. not working sir...
    any another idea..
     


  4. KUSHAL BAROT26

    KUSHAL BAROT26 New Member


    this suggestion is perfect
    Sort: @@Default: $Date

    @@ you not use this in your code
     



  5. Try It But Not Working Sir
    ;;;;My Code Below;;;

    [#Menu:Gateway of Tally]
    Add: Key Item: At End: Partywise Last Receipt Date Report : Y : Display Collection : TravelImpLedgerColl
    [Button: MyVoucherTypeBook]

    Title : "Report"
    Key : F5
    Action : Display Collection : TravelImpLedgerColl

    [Collection:TravelImpLedgerColl]

    Title : "List of Groups"
    Type : Group
    Align : Center
    Format : $Name , 25
    Format : $Parent, 15
    Format : $OpeningBalance, 10
    Format : $ClosingBalance, 12
    Sub Title : "Group Name", " Parent", "Open. Balance","Closing Balance"
    Trigger : TrigerGrpItemColl
    Variable : VarGrpItem ;; to bridge between collection and display report
    Report : DisplayGrpItem
    Filter : GrpFilter

    [Report:TrigerGrpItemColl]

    Form:TrigerGrpItemColl
    Title: "Select Stock Item Name"

    [Form:TrigerGrpItemColl]

    Part:TrigerGrpItemColl
    Vertical Align : Top
    Horizontal Align : Center

    [Part:TrigerGrpItemColl]

    Line:TrigerGrpItemColl

    [Line:TrigerGrpItemColl]

    Field:TrigerGrpItemColl

    [Field:TrigerGrpItemColl]

    Table : TravelImpLedgerColl
    Modifies : VarGrpItem
    Show Table : Always ;;show the table always
    Width : 45
    Max : 256 ;;Allows to type 50 charactor, by defualt it is only 1 charactor

    [Report:DisplayGrpItem]

    Form : DisplayGrpItem

    Title : "Ledger Under : " + ##VarGrpItem
    Variable : SVFromDate, SVToDate,
    Set : SVfromDate : $$YearOfDate:##SvCurrentdate ;$$Monthstart:##SvCurrentdate
    Variable : IsMultiPage, InNewPages,
    Set : IsMultiPage : yes
    Set : InNewPages : yes
    Set : SVToDate : ##SVCurrentdate


    [Form:DisplayGrpItem]
    Use : DSP Template
    Part : HeadingPart, DisplayGrpItem, DevBottPart
    Width : 100% screen
    Height : 100% screen


    [Part: HeadingPart]
    Line : HeadingPart


    [Line:HeadingPart]
    Field:HeadingPart

    [Field:HeadingPart]

    Use : Name field
    Set as : $$LocaleString:"Statement for the period: from " + $$String:##SVFromDate + " to " + $$String:##SVToDate
    Align : Center
    Full Width : Yes
    Local : Style : Defualt : Height : 20
    Color : Black
    Style : large bold
    Background : Light Surf Green

    [Part:DevBottPart]
    Line:DevBottPart
    Background: Dark Green

    [Line:DevBottPart]
    Field:DevBottPart

    [Field:DevBottPart]
    Info : ""
    Align : Center
    Full Width : Yes
    Local : Style :Defualt :Height :20
    Color : Black
    Style : Tiny Small ;Small Prompt;large bold
    Background : Light Surf Green;Light Sea Green;CalcBGClr
    ;Border : Thin Top
    Invisible : NOT ($$InPrintMode OR $$InExportMode OR $$InMailAction) OR ($$InCreateMode OR $$InAlterMode)
    Invisible : ($$InPrintMode OR $$InExportMode OR $$InMailAction) OR ($$InCreateMode OR $$InAlterMode)


    [Part:DisplayGrpItem]
    Line : DisplayGrpItemTitle,DisplayGrpItem
    Repeat : DisplayGrpItem : MyLedgerColl
    Scroll : Vertical
    Common Border : Yes

    [Line:DisplayGrpItemTitle]
    Field : DisplayGrpItem
    Right Field :DisplayGrpItemLastBillDate

    Local : Field : DisplayGrpItem : Info: "Ledger Name"
    Local : Field : DisplayGrpItemLastBillDate : Info: "Last Rcpt. Date"
    Local : Field : Default : Style : Normal Bold
    Local : Field : Default : Line : 0
    Local : Field : Default : Align : Center
    Border : Thick Top Bottom


    [Line:DisplayGrpItem]
    Field : DisplayGrpItem
    Right Field : DisplayGrpItemLastBillDate

    [Field:DisplayGrpItem]
    Use : Name Field
    Set as : $Name
    Width : 35
    Border : Thin Left

    [Field:DisplayGrpItemLastBillDate]
    Use : Uni Date Field
    Set as : $$CollectionField:$Date:1:AllJourVchrs
    Border : Thin Left Right
    Width : 12



    [Collection:MyLedgerColl]
    Type : Ledger
    Filter : MyLedFilter
    Fetch : VoucherTypeName, MyRecdatewisesort,*.*
    Sort :mad:@Default : $Date

    [System:Formula]
    MyRecdatewisesort:$$CollectionField:$Date:1:AllJourVchrs
    VchNoNumericIncrTest : $$TDLSysName:SORT_VchNoNumericInc

    [Collection:AllVchrsSrc]
    Type : Vouchers : Ledger
    Child Of : #DisplayGrpItem
    Belongs To : Yes
    Fetch : Amount, Date, VoucherTypeName

    [Collection:AllJourVchrs]
    Source Collection : AllVchrsSrc
    Walk : LedgerEntries
    Compute : Date : $$Owner:$Date
    Compute : VoucherTypeName : $$Owner:$VoucherTypeName
    Compute : LedgerName : $LedgerName
    Compute : Amount : $Amount
    Sort : Default : -$Date
    Filter : MyRecEntry

    [Variable:VarGrpItem]
    Type:String

    [System: Variables]
    VarGrpItem : ""


    [System: Formulae]
    MyLedFilter : $ClosingBalance > 0 AND $Parent = ##VarGrpItem

    MyRecEntry : $$IsReceipt:$VoucherTypeName AND $LedgerName = #DisplayGrpItem ;OR $$IsReceipt:$VoucherTypeName )

    GrpFilter : $Name Contains "Sundry Debtors"
     


  6. balajimg

    balajimg Active Member


    Sort: @@Default: $Date
    may not work
    try following
    Sort : Default : $Date
     


  7. Samiksha

    Samiksha New Member


    Collection is of Ledger.....under a specific group.
    Last Receipt Date is a DATE extracted from within specific vouchers of that ledger.

    So logically, I think the SORT will not work.
     


  8. mkraju_mst

    mkraju_mst New Member


    Sort :mad:@Default : $Date

    try ----Sort :mad:Default : $Date
     


Share This Page