Filter not working....please guide me....

Discussion in 'Free Source Codes' started by Jenny, Sep 28, 2018.

    
  1. Jenny

    Jenny Active Member


    Code:
    [#Menu: Gateway Of Tally]
    Add : Item : Quotation : Menu : QuotationMenu
    
    [Menu: QuotationMenu]
    
    Add : Item : Quotation Report : Display : SmReport
    [Report: SmReport]
    Use : DSP Template
    Form : PQRReport
    Title : "Quotation Report"
    Set : SVFromDate : $$MonthStart:##SVCurrentDate
    Set : SVToDate : $$MonthEnd:##SVCurrentDate
    Variable : vSalesManName : String
    Variables : ExplodeFlag, IsForexReport
    Variable : DSPShowMonthly, DSPHasMultiLevel
    Variable : IsMultiPage, InNewPages, ShowBillType, IsGrpBillReport
    Set : vSalesManName : ""
    Set : vLineitem : ""
    Set : vJobName : ""
    
    [Form: PQRReport]
    Use : DSP Template
    Parts :  FormSubTitle,PQRReport
    Height : 100% screen
    Width : 100% screen
    Button:EXPLODEFLAG, REFRESH TDL
    ;Delete : Buttons: ExplodeFlag
    Background: @@SV_RELEASEDLEAFGREEN_PL; Very Light Sea Green
    Bottom Toolbar Buttons : BottomToolBarBtn1, BottomToolBarBtn6, BottomToolBarBtn7,
    
    BottomToolBarBtn8,BottomToolBarBtn9, BottomToolBarBtn10, BottomToolBarBtn11, BottomToolBarBtn12,
    Add: Button: Salesmanfilter
    Add: Button: JobnameFilter,LineitemFilter
    
    Local : Field : FormSubTitle : Info : $$LocaleString:"QUOTATION REPORT"
    Local    : Field : Form SubTitle        : Color          : LeafGreen
    Local: Field:Form SubTitle    : Style    : Large SerIf Bold
    
    
    
    [Button    :Refresh TDL]
    Title    :"Refresh TDL"
    Key        :Alt+X
    Action    :Refresh TDL
    
    [System    :Form keys]
    Key    :Refresh TDL
    
    [System    :Menu Keys]
    Key    :Refresh TDL
    
    [#Form    :Default]
    Key    :Refresh TDL
    
    [#Menu    :Default]
    Key    :Refresh TDL
    
    [Part: PQRReport]
    Lines:PQRTitile,PQRBody
    BottomLines : PQRBody Total
    Repeat : PQRBody  :pQRSalesManVouchersColl
    CommonBorder: Yes
    Scroll : Vertical
    Total  :PQRPartyAmount
    
    [Line: PQRTitile]
    Use:PQRBody
    Local : Field : Default : Type : String
    Local : Field : Default : Style : Tiny Bold
    Local : Field : Default : Align : Centre
    Local : Field : Default : set as : $$LocaleString:"S.No."
    Local : Field : PQRPartyDate : Set as: $$LocaleString:"Date"
    Local : Field : PQRPartyVchNo : Set as: $$LocaleString:"Quot No."
    Local : Field : PQRPartyName : Set as: $$LocaleString:"Party Name"
    Local : Field : PQRPartySalesMan: Set as: $$LocaleString:"Contact Name"
    Local : Field : PQRPartySalesMan : Align : Left
    Local : Field : PQRPartyVchType : Set as: $$LocaleString:"Vch Type"
    Local : Field : PQRPartyAmount : Set as: $$LocaleString:"Amount"
    Border : Flush Totals
    
    [Line: PQRBody]
    Field:PQRSno, PQRPartyDate,PQRPartyVchNo,PQRPartyName,PQRPartySalesMan,PQRPartyVchType,DSP
    
    VchMasterIDNo
    RightField:PQRPartyAmount
    Border :Thin Bottom
    Option : AlterVchOnEnter : Yes
    Explode : MyExplodPart : ($$KeyExplode OR ##ExplodeFlag)
    
    [Part : MyExplodPart]
    Lines        : TopLines Title,JlLedger Bills Title2,JlLedgerBillTitle2Explosion
    Repeat : JlLedger Bills Title2  : Inventory Entries
    Common Borders  : Yes
    
    [Line: TopLines Title]
    Border    : Column Titles
    Field       : TopLines SubTiltle,TopLines SubQty,TopLines SubRate,TopLines SubAmt,TopLines Qty,TopLines Rate, TopLines
    
    Amount
    Space Bottom: 0.25
    
    Fixed       : No
    Local       : Field : TopLines SubTiltle     : Info : $$LocaleString:"Job Name"+$$NewLine
    Local      : Field :TopLines SubTiltle      :BackGround :yellow
    Local       : Field : TopLines SubQty    : Info : $$LocaleString:""
    Local : Field : TopLines SubQty    :BackGround :yellow
    Local       : Field : TopLines SubRate     : Info : $$LocaleString:""
    Local : Field : TopLines SubRate    :BackGround :yellow
    Local       : Field : TopLines SubAmt    : Info : $$LocaleString:""
    Local : Field : TopLines SubAmt    :BackGround :yellow
    Local       : Field : TopLines Qty     : Info : $$LocaleString:"Qty"+$$NewLine
    Local      : Field :TopLines Qty       :BackGround :yellow
    Local       : Field : TopLines Rate    : Info : $$LocaleString:"Rate"+$$NewLine
    Local      : Field :TopLines Rate       :BackGround :yellow
    Local       : Field : TopLines Amount     : Info : $$LocaleString:"Amount"+$$NewLine
    Local      : Field :TopLines Amount       :BackGround :yellow
    Local : Field : Default: BackGround :Light Grey
    
    
    [Field : TopLines SubTiltle]
    Use: Short Name Field
    Set as: ""
    Style: Small bold
    Width : 59% Screen
    Align: Left
    fixed : yes
    Border  : Totals
    
    [Field : TopLines SubQty ]
    Use: Short Name Field
    Set as: ""
    Style: Small bold
    Width : 6% Screen
    Align: Left
    fixed : yes
    Border  : Totals
    
    [Field : TopLines SubRate]
    Use: Short Name Field
    Set as: ""
    Style: Small bold
    Width : 6% Screen
    Align: Left
    fixed : yes
    Border  : Totals
    
    [Field : TopLines SubAmt]
    Use: Short Name Field
    Set as: ""
    Style: Small bold
    Width : 6% Screen
    Align: Left
    fixed : yes
    Border  : Totals
    
    [Field : TopLines Qty]
    Use: Short Name Field
    Set as: ""
    Style: Small bold
    Width : 8% Screen
    Align: Centre
    fixed : yes
    Border  : Totals
    
    
    [Field : TopLines Rate]
    Use: Short Name Field
    Set as: ""
    Style: Small bold
    Width : 7% Screen
    Align: Centre
    fixed : yes
    Border  : Totals
    
    [Field : TopLines Amount]
    Use: Short Name Field
    Set as: ""
    Style: Small bold
    Width : 8% Screen
    Align: Right
    fixed : yes
    Border  : Totals
    
    
    [Line : JlLedger Bills Title2]
    Use:JlLedger Bills Title1
    LeftFields :JLITEMTitle, JLSubQtyTitle,JLSubRateTitle,JLSubAmountTitle,JLQTYTitle, JLRATETitle, JLAmountTitle
    Explode : JlLedger Bills title1 : $$NumItems:UserDescription > 0
    Explode : JlLedgerBillTitle2Explosion : $$NumItems:UserDescription> 0
    
    
    Local : Field : JLITEMTitle      : Info : $StockItemName
    Local : Field : JLSubQtyTitle      : Info : ""
    Local : Field : JLSubQtyTitle      : BackGround :WHITE
    Local : Field : JLSubRateTitle     : Info : ""
    Local : Field : JLSubAmountTitle: Info : ""
    Local : Field : JLQTYTitle : Info : $BilledQty
    Local : Field : JLQTYTitle      : Style :tiny bold
    Local : Field : JLRATETitle     : Info : $Rate
    Local : Field : JLRATETitle      : Style :tiny bold
    Local : Field : JLAmountTitle   : Info : $amount
    Local : Field : JLAmountTitle      : Style :tiny bold
    Local : Field : JLITEMTitle      : BackGround :WHITE
    Local : Field : JLqtyTitle      : BackGround :WHITE
    Local : Field : JLrateTitle      : BackGround :WHITE
    Local : Field : JLamountTitle   : BackGround :WHITE
    Local : Field : JLITEMTitle      :Color :dark red
    Local : Field : JLSubQtyTitle      :Color :dark red
    Local : Field : JLSubRateTitle     :Color :dark red
    Local : Field : JLSubAmountTitle:Color :dark red
    Local : Field : JLqtyTitle      :Color :dark red
    Local : Field : JLrateTitle      :Color :dark red
    Local : Field : JLamountTitle      :Color :dark red
    
    [Part:JlLedger Bills Title1]
    Line: JLITEMHeadTitle,JlLedger Bills Title1
    Repeat : JlLedger Bills Title1 : myudfs
    Common Borders  : Yes
    
    [Line : JLITEMHeadTitle]
    LeftFields : JLITEMTitle11,JLSubQtyTitle11,JLSubRateTitle11,JLSubAmountTitle11
    Border: Thin Cover
    Local : Field : JLITEMTitle11    :BackGround :LeafGreen
    Local : Field : JLSubQtyTitle11    :BackGround :LeafGreen
    Local : Field : JLSubRateTitle11    :BackGround :LeafGreen
    Local : Field : JLSubAmountTitle11    :BackGround :LeafGreen
    
    
    [Line : JlLedger Bills Title1]
    LeftFields : JLITEMTitle, JLSubQtyTitle,JLSubRateTitle,JLSubAmountTitle,JLQTYTitle, JLRATETitle, JLAmountTitle
    Border : Thin Left Right
    Local : Field : JLITEMTitle  : Info : $UserDescription
    Local : Field : JLSubQtyTitle      : Info : $$String:$JapDesc
    Local : Field : JLSubRateTitle     : Info : $$AsAmount:$JapDesc1
    Local : Field : JLSubAmountTitle: Info : $$AsAmount:$JapDesc2
    Local : Field : JLQTYTitle   : Info : ""
    Local : Field : JLRATETitle  : Info : ""
    Local : Field : JLAmountTitle: Info : ""
    Local : Field : JLITEMTitle     : Space Left:2
    Local : Field : JLITEMTitle     : BackGround :WHITE
    Local : Field : JLSubQtyTitle      : BackGround :WHITE
    Local : Field : JLSubRateTitle     : BackGround :WHITE
    Local : Field : JLSubAmountTitle: BackGround :WHITE
    Local : Field : JLQTYTitle      : BackGround :WHITE
    Local : Field : JLrateTitle     : BackGround :WHITE
    Local : Field : JLAmountTitle   : BackGround :WHITE
    
    Local : Field : JLITEMTitle     : Color :blue
    Local : Field : JLSubQtyTitle      : Color :blue
    Local : Field : JLSubRateTitle     : Color :blue
    Local : Field : JLSubAmountTitle: Color :blue
    Local : Field : JLQTYTitle      : Color :blue
    Local : Field : JLrateTitle     : Color :blue
    Local : Field : JLAmountTitle   : Color :blue
    Local : Field : JLITEMTitle     : Style :tiny bold
    Local : Field : JLSubQtyTitle      : Style :tiny bold
    Local : Field : JLSubRateTitle     : Style :tiny bold
    Local : Field : JLSubAmountTitle: Style :tiny bold
    Local : Field : JLQTYTitle      : Style :tiny bold
    Local : Field : JLrateTitle     : Style :tiny bold
    Local : Field : JLAmountTitle   : Style :tiny bold
    
    [Field : JLITEMTitle11]
    Use: Short Name Field
    Set as: "Line Item"
    Width : 59% Screen
    Style: Tiny Bold
    fixed : yes
    Color : yellow
    Border  : Totals
    
    [Field : JLSubQtyTitle11]
    Use: Short Name Field
    Set as: "Sub Qty"
    Width : 6% Screen
    Style: Tiny Bold
    fixed : yes
    Color : yellow
    Border  : Totals
    
    [Field : JLSubRateTitle11]
    Use: Short Name Field
    Width : 6% Screen
    Set as: "Sub Rate"
    Style: Tiny Bold
    fixed : yes
    Color : yellow
    Border  : Totals
    
    [Field : JLSubAmountTitle11]
    Use: Short Name Field
    Width : 6% Screen
    Set as: "Sub Amt"
    Style: Tiny Bold
    fixed : yes
    Align: Right
    Color : yellow
    Border  : Totals
    
    [Field : JLITEMTitle]
    Use: Short Name Field
    Set as: ""
    Style: Tiny Bold
    Width : 59% Screen
    Align: Left
    fixed : yes
    
    
    [Field : JLSubQtyTitle ]
    Use: Short Name Field
    Style: Tiny Bold
    Set as: ""
    Width : 6% Screen
    Align: Centre
    fixed : yes
    
    
    [Field : JLSubRATETitle ]
    Use: Short Name Field
    Style: Tiny Bold
    Width : 6% Screen
    Align: Centre
    fixed : yes
    
    [Field : JLSubAMOUNTTitle ]
    Use: Short Name Field
    Style: Small bold
    Width : 6% Screen
    Align: Right
    fixed : yes
    
    [Field : JLQTYTitle]
    Use:  Number Field
    Style: Tiny Bold
    Width : 8% Screen
    Align: Centre
    format : "NOSymbol"
    
    [Field : JLRATETitle]
    Use: Rate Price Field
    Set as: ""
    Style: Tiny Bold
    Width : 7% Screen
    Align: Right
    fixed : yes
    format : "NOSymbol"
    
    [Field : JLAmountTitle]
    Use: Short Name Field
    Set as: ""
    Style: Tiny Bold
    Width : 8% Screen
    Align: Right
    fixed : yes
    
    
    [Line: JlLedgerBillTitle2Explosion]
    Fields  :EXITEM,EXSubQTY,EXSubRATE,EXSubAMT
    
    [Part:JlLedgerBillTitle2Explosion]
        Line:JlLedgerBillTitle2Explosion1
    
    [Line: JlLedgerBillTitle2Explosion1]
    Fields  : EXITEM,EXSubQTY,EXSubRATE,EXSubAMT,EXQTY,EXRATE,EXAMT
    Fixed       : yes
    Border  : Totals
    Local:Field:EXITEM  :Set as:"TOTAL :"
    Local:Field:EXSubQTY   :Set as:$descs
    Local:Field:EXSubRATE  :Set as:"";$desc1/$descs
    Local:Field:EXSubAMT   :Set as:$$AsAmount:$desc1
    Local:Field:EXITEM  :Border: FLUSH TOTALS
    Local:Field:EXSubQTY   :Border: FLUSH TOTALS
    Local:Field:EXSubRATE  :Border: FLUSH TOTALS
    Local:Field:EXSubAMT   :Border: FLUSH TOTALS
    Local:Field:EXQTY   :Border: FLUSH TOTALS
    Local:Field:EXRATE   :Border: FLUSH TOTALS
    Local:Field:EXAMT   :Border: FLUSH TOTALS
    Local:Field:EXITEM  :Background: Light Grey
    Local:Field:EXSubQTY   :Background: Light Grey
    Local:Field:EXSubRATE  :Background: Light Grey
    Local:Field:EXSubAMT   :Background: Light Grey
    Local:Field:EXQTY    :Set as:$BilledQty
    Local:Field:EXQTY   :Background: Light Grey
    Local:Field:EXRATE   :Set as:$Rate
    Local:Field:EXRATE   :Background: Light Grey
    Local:Field:EXAMT   :Set as:$Amount
    Local:Field:EXAMT   :Background: Light Grey
    
    
    [Field: EXITEM];my1
    Use     : Name Field
    Width    : 59% Screen
    Style   : Tiny Bold
    Align        : Right
    Color:red
    
    
    [Field: EXSubQTY]  ;my2
    Use     : Number Field
    Width    : 6% screen
    Style   : Tiny Bold
    Align        : Centre
    Set Always : Yes
    Size : 3
    fixed : yes
    
    [Field: EXSubRATE]
    Use     : Name Field
    Width    : 6% screen
    Style   : Normal
    Set as  : ""
    Align    : Right
    Format : Decimal : 2
    fixed : yes
    
    [Field: EXSubAMT] ;my3
    Use     : Number Field
    Width    : 6% screen
    Style   : Tiny Bold
    Storage : Desc1
    Align: Right
    Set Always : Yes
    Format : Decimal : 2
    Size : 3
    fixed : yes
    
    [Field: EXQTY]
    Use     : Number Field
    Width    : 8% screen
    Style   : Tiny Bold
    Align        : Centre
    Set Always : Yes
    fixed : yes
    
    [Field: EXRATE]
    Use     : Number Field
    Width    : 7% screen
    Style   : Tiny Bold
    Set as  : ""
    Align    : Centre
    Format : Decimal : 2
    fixed : yes
    
    [Field: EXAMT]
    Use     : Number Field
    Width    : 8% screen
    Style   : Tiny Bold
    Storage : Desc1
    Align        : Right
    Set Always : Yes
    Format : Decimal : 2
    fixed : yes
    
    
    ;==============================
    
    [Field:PQRSno]
    Set as : $$Line
    Width : 1.5 cm
    Align : Center
    
    
    [Field: PQRPartyDate]
    Set as : $Date
    Width : 10% Screen
    Align : Left
    ;Style : Tiny
    
    
    [Field: PQRPartyVchNo]
    Set as : $VoucherNumber
    Width : 10% Screen
    Align : Center
    ;Style : Tiny
    
    
    [Field: PQRPartyName]
    Use : Name Field
    Set as : $PartyLedgerName
    Width : 30% Screen
    Align : Centre
    ;Style : Tiny
    
    
    [Field: PQRPartySalesMan]
    Use :Name Field
    Set as : $$String:$MMSalesmanName
    Width : 30% Screen
    Align : Left
    ;Style : Tiny
    ;Key : Create SalesmanName
    
    [Field: PQRPartyVchType]
    Set as : $VoucherTypeName
    Width : 5% Screen
    Align : Centre
    ;Style : Tiny
    
    [Field: PQRPartyAmount]
    Use : Amount Forex Field
    Set as : $Amount
    Width : 10% Screen
    Align : Right
    ;Style : Tiny
    Format : "No Zero,DrCr,Symbol," + ##ShowForex
    
    [Line: PQRBody Total]
    Use:PQRBody
    Local : Field : Default : Type    : String
    Local : Field : Default : Style : Tiny Bold
    Local : Field : Default : Align : Centre
    Local : Field : PQRSno             : Set as: ""
    Local : Field : PQRPartyDate     : Set as: ""
    Local : Field : PQRPartyVchNo    : Set as: ""
    Local : Field : PQRPartyName     : Set as: "TOTAL"
    Local : Field : PQRPartyName     : Align : Centre
    Local : Field : PQRPartySalesMan: Set as: ""
    Local : Field : PQRPartyVchType : Set as: ""
    Local : Field : PQRPartyAmount     : Set as: $$Total:PQRPartyAmount
    Border : Flush Totals
    [System : Udf]
    MyUdfs    : Aggregate: 11998
    Descs    : Number: 11999
    Desc1    : Number:11007
    JAPDesc : Number : 12000
    JAPDesc1 : Number : 12001
    JAPDesc2 : Number : 12002 ;total amount
    
    
    ;============================== Filter
    
    [Button:JobnameFilter]
    Key : Alt+J
    Action : Alter: JobnameFilter
    Title : Job Name
    
    [Report:JobnameFilter]
    Form : JobnameFilter
    
    [Form:JobnameFilter]
    Part : JobnameFilter
    No Confirmation : Yes
    
    [Part:JobnameFilter]
    Line : JobnameFilter
    
    [Line:JobnameFilter]
    Field : Medium Prompt,JobnameFilter
    Option : alter on enter
    Local : Field : Medium Prompt : Set as : "Select Job Name: "
    
    [Field:JobnameFilter]
    Table       : StockItem, End of List
    ShowTable : Always
    Use : Name Field
    Width : 20
    Border : Thin Box
    Variable : vJobName
    Modifies : vJobName
    
    [Button:LineitemFilter]
    Key : Alt+L
    Action : Alter: LineitemFilter
    Title : Line Item
    
    [Report:LineitemFilter]
    Form : LineitemFilter
    
    [Form:LineitemFilter]
    Part : LineitemFilter
    No Confirmation : Yes
    
    [Part:LineitemFilter]
    Line : LineitemFilter
    
    [Line:LineitemFilter]
    Field : Medium Prompt,LineitemFilter
    Option : alter on enter
    Local : Field : Medium Prompt : Set as : "Select Line Item : "
    
    [Field:LineitemFilter]
    Table       :  SalesmanNameCollection, End of List
    ShowTable : Always
    Use : Name Field
    Width : 20
    Border : Thin Box
    Variable : vLineitem
    Modifies : vLineitem
    
    
    ;============================== Filter ===================================
    
    [Button:SalesmanFilter]
    Key : Alt+S
    Action : Alter: SalesmanFilter
    Title : Contact Name
    
    [Report:SalesmanFilter]
    Form : SalesmanFilter
    
    [Form:SalesmanFilter]
    Part : SalesmanFilter
    No Confirmation : Yes
    
    [Part:SalesmanFilter]
    Line : SalesmanFilter
    
    [Line:SalesmanFilter]
    Field : Medium Prompt,SalesmanFilter
    Option : alter on enter
    Local : Field : Medium Prompt : Set as : "Select Contact Name: "
    
    [Field:SalesmanFilter]
    Table : ContactNameCollection,EndOfList
    ShowTable : Always
    Use : Name Field
    Width : 20
    Border : Thin Box
    Variable : vSalesManName
    Modifies : vSalesManName
    ;Variable : PQRPartySalesman
    ;Modifies : PQRPartySalesman
    
    ;[Collection: ContactNameCollection]
    ; ListName : ""
    
    
    ;===================================== Collections ===================================
    
    [Collection: PQRSalesManVouchersColl]
    Type : Voucher
    
    Fetch : Date, VoucherNumber, VoucherTypeName,LedgerName,PartyLedgerName,MMSalesmanName, LedgerEntries.*,
    
    InventoryEntries.*, InventoryEntries.BasicUserDescription.*,InventoryEntries.Myudfs.*
    Filter : PQRSaleManVouchers , SalesManFilter, JobnameFilter,LineitemFilter
    
    [System:UDF]
    EnableSalesman : Logical : 1000
    Commission : Number : 1001
    
    [Variable:vSalesManName]
    Type : String
    
    [Variable:vJobName]
    Type : String
    
    [Variable:vLineitem]
    Type : String
    
    ;[Variable:SalesManChqVar]
    ;Type : String
    
    [System:Variable]
    vSalesManName : ""
    vJobName : ""
    vLineitem : ""
    ;SalesManChqVar : ""
    
    [System: Formula]
    PQRSaleManVouchers: $$IsSales:$VoucherTypeName OR $$IsCreditNote:$VoucherTypeName
    SalesManFilter : $MMSalesmanName = ##vSalesManName Or $$IsSysName:##vSalesManName
    JobnameFilter : $StockItemName= ##vJobName Or $$IsSysName:##vJobName
    LineitemFilter :$UserDescription = ##vLineitem Or $$IsSysName:##vLineitem
    View attachment 4098
     
    Last edited: Sep 28, 2018


Share This Page