AlterOnEnter not Working in a Report

Discussion in 'Tally Developer' started by sivam, Apr 29, 2014.

    
  1. sivam

    sivam Active Member


    Dear Experts,

    AlterOnEnter Does not work in my report. Please Help me.....

    [Report:SalesmanReport]
    Use : DSP Template
    Title : "Sales Report"
    Variable: SVFromDate, SVToDate
    Form : SalesmanReport
    Set : SVFromDate : $$MonthStart:##SVCurrentDate
    Set : SVToDate : $$MonthEnd:##SVCurrentDate
    Set : SalesManChqVar : "Full"
    Set : SalesManName : ""

    [Form:SalesmanReport]
    Button : PrintButton, ExportButton
    Button : ChangePeriod,BtnSalesMan
    Bottom Toolbar Buttons :BottomToolBarBtn2_EditVch, BottomToolBarBtn8,BottomToolBarBtn9,BottomToolBarBtn10
    Part : SWRTitle,SWRDetails
    Bottom Part :SWRTotals
    Full Width : Yes
    Space Left : 2 mms
    Space Right : 2 mms
    Space Bottom: 2 mms
    Space Top : 2 mms


    [Part:SWRTitle]
    Line : SWRTitle

    [Line:SWRTitle]
    Space Top : 2 mms
    Space Bottom: 3 mms
    Left Field : Simple Field
    Right Field : Name Field
    Local : Field : Simple Field : Info : "Sales Report"
    Local : Field : Simple Field : Style : Normal Bold
    Local : Field : Name Field : Info : @@DSPDateStr

    [Line:SWRHead]
    Use : SWRDetails
    Border : Column Titles
    Local : Field : Default : Type : String
    Local : Field : Default : Align : Center
    ;Local : Field : Default : Border : Thin Right
    Local : Field : Default : Style : Normal Bold
    Local : Field : SWSno : Set as : "Sno"
    Local : Field : SWSno : Border : Thin Left
    Local : Field : SWRDate : Set as : "Date"
    Local : Field : SWRPartyName : Set as : "Party Name"
    Local : Field : SWRPartyName : Align : Left
    Local : Field : SWRVoucherType: Set as : "Voucher Type"
    Local : Field : SWRVoucherType: Align : Left
    Local : Field : SWRSalesMan : Set as : " Sales Man"
    Local : Field : SWRSalesMan : Align : Left
    Local : Field : SWRVoucherNo : Set as : " Vch. No"
    Local : Field : SWRVoucherNo : Align : Left
    Local : Field : SWRAmount : Set as : "Amount"
    Local : Field : SWRAmount : Border : Thin Right
    Space Top : 1.5 mms
    Space Bottom: 1.5 mms

    [Part:SWRDetails]
    Line : SWRHead,SWRDetails
    Repeat : SWRDetails:SWR Voucher;SWRMain Coll
    Scroll : Vertical
    Total : SWRAmount
    Common Border : Yes

    [Line:SWRDetails]
    Field : SWSno,SWRDate,SWRPartyName
    Right Field : SWRVoucherType,SWRSalesMan,SWRVoucherNo,SWRAmount
    Option : AlterOnEnter : $$IsVoucher

    [Style:SWRDetails]
    Use : Normal

    [Field:SWSno]
    Set as : $$Line
    Width : 1 cm

    [Field:SWRDate]
    Use : Short Date Field
    Set as : $Date
    Style : SWRDetails
    Width : 10

    [Field:SWRPartyName]
    Use : Name Field
    Set as : $PArtyLedgerName
    Style : SWRDetails
    Width : 40

    [Field:SWRVoucherType]
    Use : Name Field
    Set as : $VoucherTypeName
    Style : SWRDetails

    [Field:SWRSalesMan]
    Use : Name Field
    Set as : $EISalesmanName
    Style : SWRDetails
    Width : 25

    [Field:SWRVoucherNo]
    Use : Short Name Field
    Set as : $VoucherNumber
    Style : SWRDetails
    Width : 20

    [Field:SWRAmount]
    Use : Amount Field
    Set as : $Amount
    Width : 10

    [Part:SWRTotals]
    Line : SWRTotal

    [Line:SWRTotal]
    Border : Totals
    Use : SWRDetails
    Local : Field : Default : Type : String
    Local : Field : Default : Align : Center
    Local : Field : SWSno : Border : Thin Left
    Local : Field : SWSno : Set as : ""
    Local : Field : SWRDate : Set as : ""
    Local : Field : SWRPartyName : Set as : ""
    Local : Field : SWRSalesMan : Set as : ""
    Local : Field : SWRVoucherNo : Set as : "Total"
    Local : Field : SWRAmount : Set as : $$Total:SWRAmount
    Local : Field : SWRAmount : Border : Thin Right

    [Button:BtnSalesMan]
    Key : Alt+S
    Action : Execute : SalesmanReportWise
    Title : Select Salesman

    [Report:SalesmanReportWise]
    Form : SalesmanReportWise
    Set : SalesManChqVar : "Filter"

    [Form:SalesmanReportWise]
    Part : SalesmanReportWise

    [Part:SalesmanReportWise]
    Line : SalesmanReportWise

    [Line:SalesmanReportWise]
    Field : Medium Prompt,SalesmanReportWise
    Local : Field : Medium Prompt : Set as : "Select Salesman Name:"

    [Field:SalesmanReportWise]
    Table : MySalesmanCollection,EndOfList
    ShowTable : Always
    Use : Name Field
    Width : 20
    Border : Thin Box
    Variable : SalesManName
    Modifies : SalesManName

    ;=======================================================
    ;================== Collections and System Defaults ===============
    ;=======================================================

    [Collection: MySalesmanCollection]
    Type : MyDBSalesman: Company
    Childof : ##SVCurrentCompany
    Format : $SalesmanName,25
    Title : Salesman
    Report : SalesmanReport

    [Collection: SWR Voucher]
    Type : Vouchers : VoucherType
    Child of : $$VchTypeSales
    Belongs to : Yes
    Fetch : Date,VoucherTypeName,PartyLedgerName,EI SalesmanName,Amount
    Filter : SalesManFilter

    [System:Formula]
    SalesManWise : $EISalesmanName=@@SAlesManEOL
    SalesManFull : $EISalesmanName=$EISalesmanName
    SAlesManEOL : if $$IsEndOfList:##SalesManName then $EISalesmanName Else ##SalesManName
    SalesManFilter : if ##SalesManChqVar="Filter" Then @@SalesManWise Else @@SalesManFull

    [Variable:SalesManName]
    Type : String

    [Variable:SalesManChqVar]
    Type : String

    [System:Variable]
    SalesManName : ""
    SalesManChqVar : ""

    [System: UDF]
    MyDBSalesman : Aggregate : 2
    SalesmanName : String : 1000
    EI SalesmanName : String : 1100
    EnableSalesman : Logical : 1200
     


  2. Jagdishkumar

    Jagdishkumar New Member


    Dear Mr.knsivam89

    please specify at field level like this
    [Field:SWRDate]
    Use : Short Date Field
    Set as : $Date
    Style : SWRDetails
    Width : 10
    Alter:Voucher
     
    Manoj Garg and sivam like this.


  3. sivam

    sivam Active Member



    Thank you Jagdishkumar Sir...
    Its Work Very Fine Now........
    Thank You Very Much............
     


  4. Manoj Garg

    Manoj Garg Member


    Great !
     


  5. ash007

    ash007 New Member


    CAN U SEND IN NOTE PAD BCOZ IN WORKING PROPERLY
     


  6. mohsin khan

    mohsin khan New Member


    Above tdl code how to get only sale vale without tax vale at salman amount
     


Share This Page