Problem with Collection

Discussion in 'Requests' started by SANTHOSH C KURIAN, Jan 7, 2021.

    
  1. SANTHOSH C KURIAN

    SANTHOSH C KURIAN Active Member


    Respected Experts please find the code below to print previous receipt details in simple invoice, it is working fine in individual print but not working in multiprint

    [Line:LastRcptLn]
    Fields:Medium Prompt, LrDtFld, LrAmtFld
    Space Top:1
    Local:Field:Medium Prompt:Set as:"Previous Receipt"
    Local:Field:Medium Prompt:Width:20
    Local:Field:Medium Prompt:Full Width:Yes

    [Field:LrDtFld]
    Use:Uni Date Field
    Set as:$$FilterValue:$Date:LRColl:1:LRFlt
    Width:9
    Full Width:Yes

    [Field:LrAmtFld]
    Use:Amount Field
    Set as:$$FilterValue:$Amount:LRColl:1:LRFlt
    Width:8
    Full Width:Yes
    Space Left:1
    Space Right:0

    [Collection:LRColl]
    Type:Vouchers:Ledger
    Child Of:#EIConsignee
    Belongs To:Yes
    Fetch :Date, Amount, VoucherTypeName
    Sort : @@InCreasing: -$Date

    [System:Formula]
    LrFlt:($VoucherTypeName = "Receipt") AND ($Date = < ##VARVchDate)

    In multi printing, since the date range is set to a particular date for example from 05/01/21 to 05/01/21, the collection values come as blanks, kindly advice how to override this problem. Thank you all
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Since your collection is Filtered and Sorted in reverse date ........try to use $$CollectionField instead of $$FilterValue
     


  3. SANTHOSH C KURIAN

    SANTHOSH C KURIAN Active Member


    It is also not working sir, I think since the period is locked for a single day while printing invoices in multi voucher print mode, selection is limited to that period only, I think so, that is why the fields coming blank only in multi prints. Is there any way to enhance the collection period even the period is fixed for a particular day in multi voucher print? Thank you for a quick response.
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Period is not fixed in Multi-voucher.... If it were fixed, it would be called DATE and not Period.

    You can specify begin and end of periods in the config of Multi-voucher print.
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Introduce variable SVFromDate and SVToDate in the Collection.
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Also Try this.........

    LrFlt:($VoucherTypeName = "Receipt") AND ($Date = < ##SVToDate)
     


  7. SANTHOSH C KURIAN

    SANTHOSH C KURIAN Active Member


    Problem solved by this parameter in the collection

    Filter Var:SVFromDate:Date:"01/04/2019"

    Thanks
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    I suggest you use a Dynamic value............ yours is a static value.

    Also....how come ..... FROM Date works and not TO Date...??
     


  9. SANTHOSH C KURIAN

    SANTHOSH C KURIAN Active Member


    SVFromDate and SVTodate variables are changed while we fixing from voucher date and to voucher date in the multi print configuration, if i set multi print voucher range to a single date or to a date range, the said collection also collects receipt vouchers from that range only. So I fixed SVFromdate separately in the collection. It is a static value just because for a try and SVToDate is already picked from multi print config, now my prog works fine, thanks
     


  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    :D Great !!!
     


  11. SANTHOSH C KURIAN

    SANTHOSH C KURIAN Active Member


    Thank you sir and have a nice time ahead
     


Share This Page