Dear Experts, I found detail discussions on each topic. but in cost centers i didn't find details. If any expert have idea how to get report of cost center voucher wise. please share.
You will need to re do entries.. as I have changed Udf definations Print issue persist.. Code: [#Report: Day Book] Set: DBCostExplodeFlag: Yes Set: ExplodeFlag: Yes On : Load : Yes: Call: ImranSetExplodeFlag [#Report: Voucher Register] Set: DBCostExplodeFlag: Yes Set: ExplodeFlag: Yes On : Load : Yes: Call: ImranSetExplodeFlag [Function :ImranSetExplodeFlag] 100 : Set: ExplodeFlag: No ; needed to fresh cost allocations, other 1st Mqty is not coming in first time Explode (F1) [#Line: VCHCSTCAT CstTitles] Add : Left Fields : After:VCHNameTitle:Metal Qty,MetalRate Local : Field : Metal Qty : Info : "Qty" Local : Field : MetalRate : Info : "Rate" Local : Field : Metal Qty : Style : Small Bold Local : Field : MetalRate : Style : Small Bold [#Line: VCHCST ExplLine] Add : Fields : After : VCHCST Name : MetalQty, MetalRate [#Part: VCHCST Explosion] Add : Total : MetalQty, MetalRate [#Line: VCHCST Line] Add : Fields : After : VCHCST Name : Metal Qty, MetalRate [Field : Metal Qty] Use : Number Field Storage : udfmQty Set as : IF Not $$InCreateMode then @LocalMQtyValue else $$value Set Always : Yes Width : 6 Align : Center Format : "NoZero" Fetch Object: Voucher: @LocalMQtyVchId : AllLedgerEntries.CategoryAllocations.CostCentreAllocations.udfMQty LocalMQtyVchId: $$Sprintf:@@VchMasterID:$MasterID LocalMQtyValue :$(Voucher, @@imranLocalVchId).AllLedgerEntries[1,@@imrnSameLedName].CategoryAllocations[1,@@imrnSameCatName].CostCentreAllocations[1, @@imrnSameCCName].udfMQty [System : Formulae] imranLocalVchId : $$Sprintf:@@VchMasterID:$MasterID imrnSameLedName : $LedgerName = #DspVchAccount imrnSameCatName : $Category = #VchCSTCatName imrnSameCCName : $Name = #VCHCSTName [Field : Metal Rate] Use : Number Field Storage : udfMRate Set as : IF Not $$InCreateMode then @LocalMRateValue else $$value Set Always : Yes Width : 6 Align : Center Format : "NoZero" Fetch Object: Voucher: @LocalMRateVchId: AllLedgerEntries.CategoryAllocations.CostCentreAllocations.udfMRate LocalMRateVchId: $$Sprintf:@@VchMasterID:$MasterID LocalMRateValue :$(Voucher, @@imranLocalVchId).AllLedgerEntries[1,@@imrnSameLedName].CategoryAllocations[1,@@imrnSameCatName].CostCentreAllocations[1, @@imrnsameccName].udfMRate [#Line: VCHCST Total] Add : Fields : Before : VCHCST Total : Metal QtyTotal, MetalRateTotal [Field : Metal QtyTotal] Use : Number field Width : 6 Align : Center Set as : $$Total:MetalQty Border : Totals : $$NumItems:CostCentreAllocations >= 2 Inactive : $$NumItems:CostCentreAllocations < 2 [Field : MetalRateTotal] Use : Number field Set As : $$Total:MetalRate Width : 6 Border : Totals : $$NumItems:CostCentreAllocations >= 2 Inactive : $$NumItems:CostCentreAllocations < 2 [System : UDF] udfMQty : Number : 21701 udfMRate : Number : 21702
;Now the print Problems is also solved; Jugad removed Code: [#Report: Day Book] Set: DBCostExplodeFlag: Yes ; For faster viewing report Set: ExplodeFlag: Yes [#Report: Voucher Register] Set: DBCostExplodeFlag: Yes ;; For faster viewing report Set: ExplodeFlag: Yes [#Line : DSP VchDybkDetail] Local : Field: DspVchAccount : Fetch Object: Voucher: @@imrnLocalVchId : AllLedgerEntries.CategoryAllocations.CostCentreAllocations.udfMQty Local : Field: DspVchAccount : Fetch Object: Voucher: @@imrnLocalVchId : AllLedgerEntries.CategoryAllocations.CostCentreAllocations.udfMRate [#Line: VCHCSTCAT CstTitles] Add : Left Fields : After:VCHNameTitle:Metal Qty,MetalRate Local : Field : Metal Qty : Info : "Qty" Local : Field : MetalRate : Info : "Rate" Local : Field : Metal Qty : Style : Small Bold Local : Field : MetalRate : Style : Small Bold [#Line: VCHCST ExplLine] Add : Fields : After : VCHCST Name : MetalQty, MetalRate [#Part: VCHCST Explosion] Add : Total : MetalQty, MetalRate [#Line: VCHCST Line] Add : Fields : After : VCHCST Name : Metal Qty, MetalRate [Field : Metal Qty] Use : Number Field Storage : udfmQty Set as : IF Not $$InCreateMode then @LocalMQtyValue else $$value Set Always : Yes Width : 6 Align : Center Format : "NoZero" LocalMQtyValue :$(Voucher, @@imrnLocalVchId).AllLedgerEntries[1,@@imrnSameLedName].CategoryAllocations[1,@@imrnSameCatName].CostCentreAllocations[1, @@imrnSameCCName].udfMQty [Field : Metal Rate] Use : Number Field Storage : udfMRate Set as : IF Not $$InCreateMode then @LocalMRateValue else $$value Set Always : Yes Width : 6 Align : Center Format : "NoZero" LocalMRateValue :$(Voucher, @@imrnLocalVchId).AllLedgerEntries[1,@@imrnSameLedName].CategoryAllocations[1,@@imrnSameCatName].CostCentreAllocations[1, @@imrnsameccName].udfMRate [#Line: VCHCST Total] Add : Fields : Before : VCHCST Total : Metal QtyTotal, MetalRateTotal [Field : Metal QtyTotal] Use : Number field Width : 6 Align : Center Set as : $$Total:MetalQty Border : Totals : $$NumItems:CostCentreAllocations >= 2 Inactive : $$NumItems:CostCentreAllocations < 2 [Field : MetalRateTotal] Use : Number field Set As : $$Total:MetalRate Width : 6 Border : Totals : $$NumItems:CostCentreAllocations >= 2 Inactive : $$NumItems:CostCentreAllocations < 2 [System : UDF] udfMQty : Number : 21701 udfMRate : Number : 21702 [System : Formulae] imrnLocalVchId : $$Sprintf:@@VchMasterID:$MasterID imrnSameLedName : $LedgerName = #DspVchAccount imrnSameCatName : $Category = #VchCSTCatName imrnSameCCName : $Name = #VCHCSTName
Really amazing code i m trying from last 3 weeks but didn't find how to do this. But Sir your code provides me new ways to learn and i will do more experiments with this code and will make a new report soon and will share my code on this plate form so, new learners like me will learn and expand their knowledge.
Dear Garima. Can you please up and suggest what else I can do to work my code. Objective: to generate auto column on ledgers for ledgers cost center break up. such that we can have Cost centers in rows and ledgers in columns.
Hi, In Voucher i add new filed and Call Cost Center Table but i want only one cost Category Cost Center not all..
Dear Sir, This code is working fine, and now I am able to capture Quantity rate and Amount in the Cost center itself. But please help me out to see the report cost center with quantity and amount of given period.