Report sort by button

Discussion in 'Requests' started by Hems, Aug 29, 2023.

    
  1. Hems

    Hems Member


    Dear sir
    मै sale voucher report को party wise sort करना चाहता हूँ।
    इसलिए sale voucher collection में

    Sort : @@default : $partyledgername

    लिखा इससे रिपोर्ट sort हो गई ।

    लेकिन report में बटन से कैसे sort करूँ ?
    When I click on button report will be sort ?
     


  2. Hems

    Hems Member



  3. Hems

    Hems Member


    Dear sir

    For Sorting
    $ is used with storage name

    Jay kumar tailor sir - sorting method
    And
    Bipin damaniya sir - 2b marking

    They also did the same.



    How do I sort this report for paid and due?



    IMG_20231003_115910.jpg
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    in system formula make 2 formulas

    form1 : #fldvalue contains "paid"
    form2 : #fldvalue contains "due"

    In collection --- Sort : @@Default : form1, form2
     


  5. Hems

    Hems Member



    I did as you said but not sort report


    IMG_20231003_144157.jpg
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    From above the "!" means u r using this collection as a OPTION ---- and again in that you are using the original collection !!

    Remove the USE line.
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    And what is your OPTION's conditions ---- can't say without looking at the proper parcel of the code.
     


  8. Hems

    Hems Member



    Sir
    I m using this code.
    Sorting report work by button sortreport by $partyledgername and $basicorderref


    But not sort by button duepaidsortreport

    Formdue and formpaid


    Code:
    Report : .......]
    Variable :hksort, duepaidsort
    
    [Form : ......]
    
    Button: sortreport, duepaidsortreport
    
    ;;;;;;;;;;;
    
    [Variable:hksort]
       
        Type        : Logical
        Volatile    : No
    
    
    [Variable:duepaidsort]
       
        Type        : Logical
        Volatile    : No
    
    [Button: duepaidsortreport]
    
        Key: ctrl+1
        Action  : Set : duepaidsort : NOT ##duepaidsort
       
    
    [Button:sortreport]
    
        Title:If ##hksort Then $$LocaleString:"De-Sort Report" Else $$LocaleString:"SORT Report"
        Key: ctrl+x
        Action  : Set : hksort : NOT ##hksort
       
    
    
    [Collection: for allsalesvoucher]
           
        Option : Coll AllSalesVch: not ##hksort
    or not ##duepaidsort
        Option:sort Coll AllSalesVch: ##hksort
       
    Option:duepaidsort Coll AllSalesVch: ##duepaidsort
    
    [!Collection: Coll AllSalesVch]
    
    Type : Vouchers: VoucherType
    
    Child of : $$VchTypeSales
    
    Belongs To: Yes
    
    Fetch:partyledgername, amount, vouchernumber,BasicOrderRef, ledger,*.*
    
    Filter: SalesmanFilter
    
    
    
    [!Collection:sort Coll AllSalesVch]    
            Use:Coll AllSalesVch
            Sort:@@default:$basicorderref,$partyledgername
    
    
    [!Collection:duepaidsort Coll AllSalesVch]    
            Use: Coll AllSalesVch
            Sort : @@default : formpaid, formdue
    
    [System : formula]
    
    Formpaid :#SVRmarktitle contains "paid"
    Formdue :#SVRmarktitle contains "due"
    
     


  9. Hems

    Hems Member


    Sir
    report has not been sorted
    But
    Filtered according to due and paid


    IMG_20231004_230159.jpg 2hUntitled.jpg 3hUntitled.jpg
     


Share This Page