Show & Hide Button for Cost Column

Discussion in 'Tally Developer' started by Hasan@123, May 6, 2020.

    
  1. Hasan@123

    Hasan@123 Member


    Dear All developers,
    I want add a button here to Show and hide Cost Column in this report but I dont know to do that.
    Please check my code.. and Help!
     

    Attached Files:

    Last edited: May 28, 2020


  2. gangstar

    gangstar Member


    [#Menu: Gateway of Tally]
    Add: Item: before : @@locBalanceSheet :price List : Display: HAS_Price List


    [Report: HAS_Price List]

    Form : HAS_Price List
    Use : Dsp Template
    Title : "Price List 2.0"
    Variable: ExplodeFlag, Stock Group Name

    [Form: HAS_Price List]

    Part : HAS_Price List, HAS_Price List Details
    Background : White, Light Orange
    Button : Change Period, Explode Flag, StockQuery
    Buttons : PrintButton, ExportButton, UploadButton, MailButton,CostDisable
    BottomButton : BlankButton, RelReports, InvReports, AcctReports, Report Operations, /*StatRegConfigure,*/ FilterButton, ValueButton
    Keys : Form Remove Line, Form Show Last Removed Line

    Height : 100 % Screen
    Width : 100 % Screen

    [Part: HAS_Price List]

    Lines : HASPrtHdr

    [Line: HASPrtHdr]

    Field : Name Field
    Right Field : DSP MainDateTitle
    Field : HASFldHrd
    Local : Field : Name Field : Style : Normal Bold
    Space Bottom : 1.5

    [Field: HASFldHrd]

    Set As : "PRICE LIST"
    Style : Normal Bold
    FullWidth : Yes
    Border : Thin Bottom
    Align : Centre
    Skip : Yes
    Fixed : Yes
    Width : 50% Screen



    [Part: HAS_Price List Details]

    Lines : HAS_Price List Title, HAS_Price List Details
    Repeat : HAS_Price List Details : Smpl Stk Grp and Item Coll

    Total : HAS_Price List Item Price, HAS_Price List Item Qty, HAS_Price List Item Value,
    Scroll : Vertical
    Common Border : Yes

    [Line: HAS_Price List Details]

    Fields : HAS_Price List Item Name,
    Right Field : HAS_Price List Item Price, HAS_Price List Item Qty, HAS_Price List Item Value
    Explode : Smpl Stk Grp Item Details : $$IsStockGroup AND (##ExplodeFlag OR $$KeyExplode)

    Option : Smpl IsStock Item : $$IsStockItem
    Space Bottom: 2 mms


    [Part: Smpl Stk Grp Item Details]

    Line : Smpl Stk Grp Item Details
    Repeat : Smpl Stk Grp Item Details : Smpl Stk Grp and Item Coll

    [Line: Smpl Stk Grp Item Details]

    Use : HAS_Price List Details


    [Line: HAS_Price List Total]

    Use : HAS_Price List Details

    Local : Field : Default : Type : String
    Local : Field : HAS_Price List Item Name : Align : Center




    [Line: HAS_Price List Title]

    Use : HAS_Price List Details

    Local : Field : Default : Type : String
    Local : Field : HAS_Price List Item Name : Set As : "Particulars"
    Local : Field : HAS_Price List Item Price : Set as : "Price"

    Local : Field : HAS_Price List Item Qty : Set As : "Closing Stock"
    Local : Field : HAS_Price List Item Value : Set As : "Cost"
    Local :Field : Default : Style : Normal Bold
    Local :Field : Default : Align : Centre

    Border : Column Titles


    [Field: HAS_Price List Item Name]

    Use : Name Field
    Set As : $Name

    Option : Smpl Stk Grp Item Name : $$IsStockItem
    Option : Smpl Stk Grp Name : $$IsStockGroup
    Color: Black


    [!Field: Smpl Stk Grp Name]

    Variable: Stock Group Name
    Display : HAS_Price List

    Alter : Stock Group
    Variable: StockGroupName
    Color : Black


    [!Field: Smpl Stk Grp Item Name ]

    Variable: Stock Item Name
    Display : Item Monthly Summary
    Style : Normal Italic

    Alter : Stock Item

    [FIELD: HAS_Price List Item Price]
    Use : SIMPLE FIELD
    Set As : $$GetPriceFromLevel:$StockItemName:"Pricelist":##SvCurrentDate:$ClosingBalance
    Storage : PriceListRte
    Width : 25
    Style : Normal
    Border : Thin Left


    [Field: HAS_Price List Item Qty]

    ;Use : Qty Primary Field
    ;Type: Number: Forced
    ;Set Always: Yes
    Width : @@NameWidth
    Set As : $ClosingBalance
    Color : Black
    Style : Normal
    Border : Thin Left

    [Field: HAS_Price List Item Value]
    USE: SIMPLE FIELD
    SET AS: $STANDARDCOST
    Width : 15
    Style : Normal
    Border : Thin Left
    Invisible: NOT $CostDisable:Company:##SVCURRENTCOMPANY;$$IsCmpOwner


    [Button: StockQuery]
    Key: F3
    Title:$$LocaleString:"Stock Query"
    Action:Display:Stock Query


    [Collection: Smpl Stk Grp and Item Coll]

    Collection : Smpl Stk Grp Coll, Smpl StkGrp Items


    [Collection: Smpl Stk Grp Coll]

    Type : Stock Group
    Child Of: #StockGroupName
    Fetch : Name, Closing Balance, Closing Value

    [Collection: Smpl StkGrp Items]

    Type : Stock Item
    Childof : #StockGroupName
    Fetch : Name, Closing Balance, Closing Value
    Compute : IntQtyOpBal :$$AsSignedQty:$$GodownItemValue:mad:@IntFGPET:$StockItemName:$OpeningBalance

    [System: Formula]
    IntFGPET : "Finished Good PET";"Finished Goods - Int"

    [Button:CostDisable]
    Key:F12
    Action:Alter:CostDisable
    Title:Show/Hide Column

    [Report:CostDisable]
    Object:Company
    Form:CostDisable

    [Form:CostDisable]
    Top Part:CostDisableTop
    Full Width:No
    No Confirmation:Yes
    Space Bottom: 3 MM
    Space Left: 4 MM
    Space Right: 4 MM
    Space Top: 3 MM

    [Part:CostDisableTop]
    Line:CostDisableTop

    [Line:CostDisableTop]
    Field:MEDIUM PROMPT,CostDisableTop
    Local:Field:MEDIUM PROMPT:Set as:"Show Cost Column"
    Space Bottom: 1 MM

    [Field:CostDisableTop]
    Use:LOGICAL FIELD
    Set as:$$Value
    Storage:CostDisable

    [System:UDF]
    CostDisable:Logical:1550
     


  3. Hasan@123

    Hasan@123 Member


    Thanks a lot... but how to make Show/Hide Column button by default NO?
     


  4. Bipin Damania

    Bipin Damania Active Member


    Add BottomToolBarButton 8 & 9 for Remove Line & Recall Line
     


Share This Page