Important Buttons (keys) In Report/Form

Discussion in 'Tally Developer' started by Rupal Agarwal, May 17, 2022.

    
  1. Rupal Agarwal

    Rupal Agarwal Member


    Hello everyone,
    I have created a report to check sales & purchase side by side, and now I want to add necessary keys in my report like :

    Enter : to open the voucher entry from selected line
    delete : to delete the voucher entry
    add voucher : to add voucher from my report
    and any other important or useful key which will help in day to day working.
    Please suggest the ways to add these keys and make the working properly in my repot

    Thank You

    My code is given below :

    Code:
    [#Menu:gateway of tally]
        Add:Item: Sale Purchase: Display: salepur
    
    [Report:SalePur]
        Form:SalePur
       
    [Form:SalePur]
        Part: Entries
        Height:100% page
        Width: 100% page
       
    ;;==========================================
    
    Button: change date, change period, remove line, restore line
       
    ;;==========================================
    
    [Part:entries]
        Part:SEntries, Pentries
           
    [Line:titles]
        Field: Date, Party
        Right Field:VCHName, VCH no, Amount
        Local:Field:date:Info:"Date"
        Local:Field:Party:Info:"Party"
        Local:Field:VCHName:Info:"Voucher name"
        Local:Field:VCH no:Info:"Voucher no"
        Local:Field:Amount:Info:"Amount"
        Space Bottom:0.1
        Space Top:0.1
        Border:thinbox
    ;;================================================================   
    [Part:Sentries]
        Line:head, titles, entries
        Bottom Line:total
        Repeat:Entries:SalesColl
        Scroll:Vertical
        Width: 50% Page
        Border:thinbox
        Background:@@SV_SALESVOUCHER
        Total:amount
        ;;======================================
    [Part:Pentries]
        Line:head, titles, entries
        Bottom Line: total
        Repeat:Entries:PurColl
        Scroll:Flow
        Width: 50% Page
        Border:thinbox
        Background:@@SV_PURCHASEVOUCHER
        Local:Field:head:Info:"List of all Purchse entries"
        Total:amount
    ;;================================================================   
    [Line:head]
        Field:head
        Space Bottom:0.2
        Space Top:0.2
        Border:thin box
       
    [Field:head]
        Use:name field
        Set as:"List Of all Sales entries"
        Align:Center
        Width:50% screen
    ;;================================================================   
    [Line:total]
        right Field:total title,total
        Border:thin box
       
    [Field:total title]
        Use:Short prompt
        Info:"Total Sales : "
       
    [Field:total]
        Use : number field
        Set as:$$Total:amount
        Width:20
        Align:Right
        Format      : "Symbol, No Zero,"
    ;;================================================================   
    [Line:entries]
        Field: Date, Party
        Right Field:VCHName, VCH no, Amount
    
    [Field:date]
        Use:Short Date Field
        Set as:$date
        Style:normal
    
    [Field:party]
        Use:name field   
        Set as:if not $partyledgername = "" then $partyledgername else "       "+$$LocaleString:"((cancelled))"
        ;Style:normal
       
    [Field:Vchname]
        Use:short name field
        Set as:$vouchertypename
        Style:normal
       
    [Field : Vch no]
        Use:short name field
        Set as : $vouchernumber
        Style:normal
       
    [Field:amount]
        use:amount field
        Set as:$amount
        format      : "Symbol, No Zero"
        Style:normal
    
    ;;================================================================
    
    [Collection:SalesColl]
        Type:vouchers:vouchertype
        Child Of:$$VchTypeSales
        Belongs To:Yes
        Fetch:date, partyledgername, vouchertype, vouchernumber, amount
       
    [Collection:PurColl]
        Type:vouchers:vouchertype
        Child Of:$$VchTypePurchase
        Belongs To:Yes
        Fetch:date, partyledgername, vouchertype, vouchernumber, amount
       
    ;;================================================================
    Also, please provide suggestions to improve my report

    Thank You :D
     


  2. balajimg

    balajimg Active Member


    refer day book TDL code
     


  3. Rupal Agarwal

    Rupal Agarwal Member


    I want to add the Enter button to view/alter the voucher.
    And f2 to show the transactions of a particular date only.

    Can someone please help me in these 2 buttons.
     


  4. narayane88

    narayane88 Active Member


    add field myMasterId in your repeted line and use this sentence in line Option:AlteronEnter
    Code:
    [Field:myMasterId]
        Use:Short Name Field
    
    Set:$$SPrintF:@@VCHMasterID:$MasterID
    Variable:VchMasterIDNo
    Modifies:DSp vchMasterIdNo
    Border:Thin Left
    Invisible:Yes
    Alter:Voucher
    and also fetch master id in collection
     
    Rupal Agarwal likes this.


  5. Bipin Damania

    Bipin Damania Active Member


    Code:
    [Form:SalePur]
        Use:DSP TEMPLATE

    Add this line at Form and remove Button Line
    Use: DSP TEMPLATE

    Bottom ToolBar Buttons: BottomToolBarBtn3, BottomToolBarBtn5, BottomToolBarBtn6, BottomToolBarBtn7

    For Filter use Button
    Ctrl+F12

    Use Ctrl+Enter to View/Edit or Delete Voucher
     
    Last edited: Jun 1, 2022
    Adeshwar Mehta likes this.


  6. Rupal Agarwal

    Rupal Agarwal Member


    Thank you so much buddy, it's working perfectly fine
     



  7. This worked like a charm. With this many of my reports are now easier. Just scrolling in the forum gives so much knowledge. Thanks @bipinji
     


  8. Rupal Agarwal

    Rupal Agarwal Member


    This is not working in tally ERP 9
     


  9. narayane88

    narayane88 Active Member


    Fetch Master Id in collection
     


  10. Rupal Agarwal

    Rupal Agarwal Member


    did that sir
     


Share This Page