Tally Report Export Query

Discussion in 'Free Source Codes' started by kapil22, Jun 1, 2022.

    
  1. kapil22

    kapil22 Member


    Dear Expert,
    Need your help,
    i export customised columnar report, where column have "group company" and amount value is correct.
    But when i export the data i get amount value of 1st member company only.

    kindly advise.

    Thanks & Regards,
    Kapil




    Code:
    [#Table:     GTCommonReports]
    add:         object:     GTCCCReportK010
    
    [Object:         GTCCCReportK010]
    Use:             GoToReport Obj
    Name:        $$LocaleString:"Cost Centre Summary Report"
    Current Report:     K010Report
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    
    
    [Report:     K010Report]
    
    Title:         "Cost Centre Summary Report"
    ;Filtered:     Yes
    Export:         Yes
    Form:         K010Form
    Use:             DSP Template
    Variables:     SVCurrentCompany, CostCentreName, SVFromDate, SVToDate,
    ;set:            IsCCReport:     no
    ;set:            IsCCBkup:        no
    set:            SVFromDate:    $BookFrom:Company:##SVCurrentCompany
    set:            SVToDate:        $$Min:@@FinYrEnding:$EndingAt:Company:##SVCurrentCompany
    Column Report:    K010ReportColumn
    Repeat:         SVCurrentCompany, SVFromDate, SVToDate
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [Form:         K010Form]
    Part:        K010PartTitle, K010PartData,
    width:         100% page
    height:        100% page
    Button:         BlankButton1, ExplodeFlag, ; F2ChangePeriod,
    button:        BlankButton2, K010CostCentre, ;ChangeCompany
    BUTTON:        BlankButton3, K010BValue, K010AValue, K010ATValue, K010VValue, BlankButton6, K010BCode
    button:        BlankButton4, AddColumn, AlterColumn, DeleteColumn,
    BUTTON:        BlankButton5,RemoveLine, Restore Line, Restore AllLines
    Page Break:     DSP ClPageBreak, K010OpPageBreak
    Space Top:         if $$InPrintMode then ##SVSpaceTop  else 0.05 inches
    Space Bottom:     if $$InPrintMode then 0.5  else 0    inches
    Space Left:         if $$InPrintMode AND $$InPixelMode then 0.5  else 0 inches
    Space Right:         if $$InPrintMode AND $$InPixelMode then 0.25 else 0 inches
    Button:        saveview
    [Part:         K010OpPageBreak]
    Parts:         K010PartTitle, DSP ScaleFactor, K010PartData
    Vertical:     Yes
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    
    [Part:        K010PartTitle]
    line:        K010PartTitle1Line4, K010PartTitle1Line5, K010PartTitleLine1, K010PartTitleLine2, K010PartTitleLine3
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [line:        K010PartTitle1Line4]
    Field:         SimplePrompt,
    local:        field:    SimplePrompt:    info:        @@CmpMailName
    local:        field:    SimplePrompt:    style:        LargeBold
    local:        field:    SimplePrompt:    width:        40
    local:        field:    SimplePrompt:    color:        Black
    local:        field:    SimplePrompt:    cell:        3
    local:        field:    SimplePrompt:    align:        left
    local:        field:    SimplePrompt:    Invisible:     NOT ($$InPrintMode OR $$InExportMode )
    [line:        K010PartTitle1Line5]
    Field:         NameField
    local:        field:    NameField:    info:        $$LocaleString:"Cost Centre Summary Report"
    local:        field:    NameField:    Style:        LargeBold
    local:        field:    NameField:    width:        40
    local:        field:    NameField:    color:        Black
    local:        field:    NameField:    cell:        3
    local:        field:    NameField:    align:        left
    local:        field:    NameField:    border:        Thin Bottom
    local:        field:    NameField:    Invisible:     NOT ($$InPrintMode OR $$InExportMode )
    Space Bottom:     if $$InPrintMode then 0.5 else 0
    
    [line:        K010PartTitleLine1]
    Field       :     SimplePrompt, NameField
    local    :    field    :    SimplePrompt        :    SET AS    :    "Fund Type :"
    local    :    field    :    SimplePrompt        :    style    :    TinyBold
    local    :    field    :    SimplePrompt        :    width    :    12
    local    :    field    :    SimplePrompt        :    color    :    Blue
    local    :    field    :    SimplePrompt        :    cell    :    2
    local    :    field    :    NameField        :    Set as        :     $Parent:CostCentre:#SimpleField
    local    :    field    :    NameField        :    Style    :    TinyBold
    local    :    field    :    NameField        :    width    :    35
    local    :    field    :    NameField        :    color    :    red
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [line:        K010PartTitleLine2]
        Field       :     SimplePrompt, SimpleField, ;NameField, ShortNameField
        local    :    field    :    SimplePrompt        :    SET AS    :    "Fund Agency :"
        local    :    field    :    SimplePrompt        :    style    :    TinyBold
        local    :    field    :    SimplePrompt        :    width    :    12
        local    :    field    :    SimplePrompt        :    color    :    Blue
        local    :    field    :    SimplePrompt        :    cell    :    2
        local    :    field    :    SimpleField        :    Set as        :     $Parent:CostCentre:##CostCentreName
        local    :    field    :    SimpleField        :    Style    :    TinyBold
        local    :    field    :    SimpleField        :    width    :    35
        local    :    field    :    SimpleField        :    color    :    red
    ;    local    :    field    :    NameField        :    width    :    5
    ;    local    :    field    :    ShortNameField    :    SET AS    :    "Period"
    ;    local    :    field    :    ShortNameField    :    style    :    TinyBold
    ;    local    :    field    :    ShortNameField    :    width    :    10
    ;    local    :    field    :    ShortNameField    :    color    :    Blue
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [line:        K010PartTitleLine3]
        Field       :     SimplePrompt, ShortNameField, ;NameField, DSPMainDateTitle,
        Space Bottom:     if $$InPrintMode then 0.5 else 0.5
        local    :    field    :    SimplePrompt        :    SET AS    :    "Project :"
        local    :    field    :    SimplePrompt        :    Style    :    TinyBold
        local    :    field    :    SimplePrompt        :    width    :    12
        local    :    field    :    SimplePrompt        :    color    :    Blue
        local    :    field    :    SimplePrompt        :    cell    :    2
        local    :    field    :    ShortNameField    :    Set as        :     ##CostCentreName
        local    :    field    :    ShortNameField    :    STYLE    :    TinyBold
        local    :    field    :    ShortNameField    :    width    :    35
        local    :    field    :    ShortNameField    :    color    :    red
    ;    local    :    field    :    NameField        :    width    :    5
    ;    local    :    field    :    DSP MainDateTitle    :    align    :    left
    ;    local    :    field    :    DSP MainDateTitle    :    color    :    red
    ;    local    :    field    :    DSP MainDateTitle    :    Style    :    TinyBold
    ;    local    :    field    :    DSP MainDateTitle    :    width    :    15
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [Part:        K010PartData]
    line:        K010PartDataTitleLine1, K010PartDataTitleLine2,
    line:        K010PartDataTitleLine3, K010PartDataTitleLine4,
    line:        K010PartDataDataLine1
    repeat:        K010PartDataDataLine1: K010Collection
    bottom Line:    K010PartDataGrandTotalLine
    total:        K010FieldBudgetAmtB
    total:        K010FieldActualAmtB
    total:        K010FieldTotalAmtB
    total:        K010FieldVarrianceAmtB
    Space Top:         if $$InPrintMode then 0 else 0
    Space Bottom:     if $$InPrintMode then 0.5 else 0
    Space Left:         if $$InPrintMode then 0.5 else 0.5
    scroll:             BOTH
    Common Border:    yes
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [line:        K010PartDataTitleLine1]       
    field:        K010FieldSNo, K010FieldMasterID, K010FieldCode, K010FieldName, K010FieldName1, 
    Field:        K010FieldBudgetAmtA, K010FieldBudgetAmtB
    FIELD:         K010FieldActualAmtCOM,
    FIELD:        K010FieldTotalAmtA, K010FieldTotalAmtB,
    FIELD:        K010FieldVarrianceAmtA, K010FieldVarrianceAmtB,
    repeat:        K010FieldActualAmtCOM
    Local:        Field:     Default:                 Style:         TinyBold
    Local:        Field:    Default:                 Border:         K010ColumnTitlesTop
    Local:        Field:     Default:                 LINE:         1
    Local:        Field:     Default:                 align:        Left
    local:        Field:    Default:                 Color:        Black
    Local:        Field:    K010FieldSNo:             Info:         "SNo"
    Local:        Field:    K010FieldMasterID:        info:        "MasterID"
    Local:        Field:    K010FieldCode:            Info:         "Code"
    Local:        Field:    K010FieldName1:        info:        "Particulars (Budget Lines)"
    local:        field:    K010FieldBudgetAmtA:    info:        "Budget"
    local:        field:    K010FieldBudgetAmtA:    align:        center
    local:        field:    K010FieldBudgetAmtB:    info:        "TEST BUDGET"
    Local:        Field:    K010FieldActualAmtA:    Info:         #SVCurrentCompany
    Local:        Field:    K010FieldActualAmtA:    align:        center
    Local:        Field:    K010FieldActualAmtA:    Color:        Blue
    Local:        Field:    K010FieldActualAmtA:    border:        ColumnTitles
    Local:        Field:    K010FieldActualAmtB:    INFO:        "TEST ACTUAL"
    local:        Field:    K010FieldTotalAmtA:     info:        "Actual"
    Local:        Field:    K010FieldTotalAmtA:    align:        center
    Local:        Field:    K010FieldTotalAmtB:    INFO:        "TEST TOTAL"
    local:        Field:    K010FieldVarrianceAmtA:     info:        "Varriance"
    local:        Field:    K010FieldVarrianceAmtA:     align:        center
    local:        Field:    K010FieldVarrianceAmtB:     info:        "TEST VARRIANCE"
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [line:        K010PartDataTitleLine2]       
    field:        K010FieldSNo, K010FieldMasterID, K010FieldCode, K010FieldName, K010FieldName1, 
    Field:        K010FieldBudgetAmtA, K010FieldBudgetAmtB
    FIELD:         K010FieldActualAmtCOM,
    FIELD:        K010FieldTotalAmtA, K010FieldTotalAmtB,
    FIELD:        K010FieldVarrianceAmtA, K010FieldVarrianceAmtB,
    repeat:        K010FieldActualAmtCOM
    Local:        Field:     Default:                 Style:         TinyBold
    Local:        Field:     Default:                 LINE:         1
    Local:        Field:    K010FieldSNo:             Info:         ""
    Local:        Field:    K010FieldMasterID:        info:        ""
    Local:        Field:    K010FieldCode:            Info:         ""
    Local:        Field:    K010FieldName1:        info:        ""
    local:        field:    K010FieldBudgetAmtA:    info:        ""
    local:        field:    K010FieldBudgetAmtB:    info:        ""
    Local:        Field:    K010FieldActualAmtA:    Info:         @@DSPDateStr
    Local:        Field:    K010FieldActualAmtA:    align:        center
    Local:        Field:    K010FieldActualAmtA:    Color:        Red
    Local:        Field:    K010FieldActualAmtA:    border:        K010ColumnTitlesBottom
    Local:        Field:    K010FieldActualAmtB:    INFO:        ""
    local:        Field:    K010FieldTotalAmtA:     info:        ""
    Local:        Field:    K010FieldTotalAmtB:    INFO:        ""
    local:        Field:    K010FieldVarrianceAmtA:     info:        ""
    local:        Field:    K010FieldVarrianceAmtB:     info:        ""
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [line:        K010PartDataTitleLine3]       
    field:        K010FieldSNo, K010FieldMasterID, K010FieldCode, K010FieldName, K010FieldName1, 
    Field:        K010FieldBudgetAmtA, K010FieldBudgetAmtB
    FIELD:         K010FieldActualAmtCOM,
    FIELD:        K010FieldTotalAmtA, K010FieldTotalAmtB,
    FIELD:        K010FieldVarrianceAmtA, K010FieldVarrianceAmtB,
    repeat:        K010FieldActualAmtCOM
    Local:        Field:     Default:                 Style:         TinyBold
    Local:        Field:     Default:                 LINE:         1
    Local:        Field:    K010FieldSNo:             Info:         ""
    Local:        Field:    K010FieldMasterID:        info:        ""
    Local:        Field:    K010FieldCode:            Info:         ""
    Local:        Field:    K010FieldName1:        info:        ""
    Local:        field:    K010FieldBudgetAmtA:    info:        ""
    Local:        field:    K010FieldBudgetAmtB:    info:        ""
    Local:        Field:    K010FieldActualAmtA:    Info:         $$LocaleString:"Nett Amount"
    Local:        Field:    K010FieldActualAmtA:    align:        center
    Local:        Field:    K010FieldActualAmtA:    Color:        Black
    Local:        Field:    K010FieldActualAmtA:    border:        K010ColumnTitlesBottom
    Local:        Field:    K010FieldActualAmtB:    INFO:        ""
    local:        Field:    K010FieldTotalAmtA:     info:        ""
    local:        Field:    K010FieldTotalAmtB:     info:        ""
    local:        Field:    K010FieldVarrianceAmtA:    info:        ""
    local:        Field:    K010FieldVarrianceAmtB:    info:        ""
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [line:        K010PartDataTitleLine4]       
    field:        K010FieldSNo, K010FieldMasterID, K010FieldCode, K010FieldName, K010FieldName1, 
    Field:        K010FieldBudgetAmtA, K010FieldBudgetAmtB
    FIELD:         K010FieldActualAmtCOM,
    FIELD:        K010FieldTotalAmtA, K010FieldTotalAmtB,
    FIELD:        K010FieldVarrianceAmtA, K010FieldVarrianceAmtB,
    repeat:        K010FieldActualAmtCOM
    Local:        Field:     Default:                 Style:         TinyBold
    Local:        Field:    Default:                 Border:         K010ColumnTitlesBottom
    Local:        Field:     Default:                 LINE:         1
    Local:        Field:    K010FieldSNo:             Info:         ""
    Local:        Field:    K010FieldMasterID:        info:        ""
    Local:        Field:    K010FieldCode:            Info:         ""
    Local:        Field:    K010FieldName1:        info:        ""
    local:        field:    K010FieldBudgetAmtA:    info:        ""
    local:        field:    K010FieldBudgetAmtB:    info:        ""
    Local:        Field:    K010FieldActualAmtA:    Info:         $$LocaleString:"Actual"
    Local:        Field:    K010FieldActualAmtA:    align:        center
    Local:        Field:    K010FieldActualAmtA:    Color:        Blue
    Local:        Field:    K010FieldActualAmtB:    INFO:        ""
    local:        Field:    K010FieldTotalAmtA:    info:        ""
    local:        Field:    K010FieldTotalAmtB:     info:        ""
    local:        Field:    K010FieldVarrianceAmtA:     info:        ""
    local:        Field:    K010FieldVarrianceAmtB:     info:        ""
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [line:        K010PartDataDataLine1]            ;;; this Line for data
    field:        K010FieldSNo, K010FieldMasterID, K010FieldCode, K010FieldName, K010FieldName1,
    Field:        K010FieldBudgetAmtA, K010FieldBudgetAmtB,
    FIELD:        K010FieldActualAmtCOM
    FIELD:         K010FieldTotalAmtA, K010FieldTotalAmtB,
    FIELD:        K010FieldVarrianceAmtA, K010FieldVarrianceAmtB
    repeat:        K010FieldActualAmtCOM                         ;;his repeat attribute for repeat amount columnwise
    total:        K010FieldActualAmtA, K010FieldActualAmtB        ;;his total attribute for Column total
    Local:        Field:     Default:                     border:    Thin Left Right bottom
    Local:        Field:     K010FieldCode:                Style:     TinyBold
    local:        field:    K010FieldName1:            Indent:     $$ExplodeLevel * 1.5
    local:        field:    K010FieldBudgetAmtA:        color:    Black
    local:        field:    K010FieldBudgetAmtA:        Style:     TinyBold
    local:        field:    K010FieldActualAmtA:        color:    Black
    local:        field:    K010FieldActualAmtA:        Style:     TinyBold
    local:        field:    K010FieldTotalAmtA:        color:    Black
    local:        field:    K010FieldTotalAmtA:        Style:     TinyBold
    local:        field:    K010FieldVarrianceAmtA:        color:    Black
    local:        field:    K010FieldVarrianceAmtA:        Style:     TinyBold
    ;option:        ExplodeOnEnter  ;; inactive this option due to activate budget line as varriable to further drill down
    option:        DisplayOnEnter ;; this line option will not initiate the alter
    explode:        K010PartDataDataLine1PartExplode:        if $$IsEmpty:#ShortNameField then no else ($$IsCostCentre AND $NumChildren > 0 and ($$KeyExplode or ##ExplodeFlag))
    key:            RemoveLine, Restore Line, Restore AllLines
    Space top:     0.4
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [part:        K010PartDataDataLine1PartExplode]    ;;; this exploded part
    line:        K010PartDataDataLine1
    repeat:        K010PartDataDataLine1: K010Collection
    local:        line:    K010PartDataDataLine1:    local:    field:    K010FieldBudgetAmtA:        color:    if $CostCentreDepth=4 then "Black" else if $CostCentreDepth=5 then "Blue" else  "StoneWashRed"
    local:        line:    K010PartDataDataLine1:    local:    field:    K010FieldBudgetAmtA:        Style:     If $NumChildren > 0 Then "TinyBold" Else if $CostCentreDepth=4 then "TinyBold" else "Tiny Italic"
    local:        line:    K010PartDataDataLine1:    local:    field:    K010FieldActualAmtA:        color:    Black
    local:        line:    K010PartDataDataLine1:    local:    field:    K010FieldActualAmtA:        Style:     If $NumChildren > 0 Then "TinyBold" Else if $CostCentreDepth=4 then "TinyBold" else "Tiny Italic"
    local:        line:    K010PartDataDataLine1:    local:    field:    K010FieldTotalAmtA:        color:    if $CostCentreDepth=4 then "Black" else if $CostCentreDepth=5 then "Blue" else  "StoneWashRed"
    local:        line:    K010PartDataDataLine1:    local:    field:    K010FieldTotalAmtA:        Style:     If $NumChildren > 0 Then "TinyBold" Else if $CostCentreDepth=4 then "TinyBold" else "Tiny Italic"
    local:        line:    K010PartDataDataLine1:    local:    field:    K010FieldVarrianceAmtA:        color:    if $CostCentreDepth=4 then "Black" else if $CostCentreDepth=5 then "Blue" else  "StoneWashRed"
    local:        line:    K010PartDataDataLine1:    local:    field:    K010FieldVarrianceAmtA:        Style:     If $NumChildren > 0 Then "TinyBold" Else if $CostCentreDepth=4 then "TinyBold" else "Tiny Italic"
    Space top:     0.4
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [line:        K010PartDataGrandTotalLine]        ;;; this Line for Grand Total
    field:        K010FieldSNo, K010FieldMasterID, K010FieldCode, K010FieldName, K010FieldName1, 
    Field:        K010FieldBudgetAmtA,
    FIELD:        K010FieldActualAmtCOM
    FIELD:        K010FieldTotalAmtA,
    FIELD:        K010FieldVarrianceAmtA,
    repeat:        K010FieldActualAmtCOM
    Local:        Field:    default:                BORDER:        RightTotals
    Local:        Field:    default:                style:         TinyBold
    Local:        Field:    default:                color:         Black
    Local:        Field:    K010FieldSNo:             Info:         ""
    Local:        Field:    K010FieldMasterID:        Info:         ""
    Local:        Field:    K010FieldCode:            Info:         ""
    Local:        Field:    K010FieldName1:        info:        "Grand Total:"
    Local:        Field:    K010FieldBudgetAmtA:    setas:         $$Total:K010FieldBudgetAmtB
    Local:        Field:    K010FieldActualAmtA:    setas:         $$Total:K010FieldActualAmtB
    local:        Field:    K010FieldTotalAmtA:    setas:        $$Total:K010FieldTotalAmtB
    Local:        Field:    K010FieldVarrianceAmtA:    setas:        $$Total:K010FieldVarrianceAmtB
    Space top:    0.9
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [field:        K010FieldBudgetAmtA]    
    use:            AmountField
    width:        if $$InPrintMode then 10 else 12
    Style:         tiny
    FORMAT:        "Bracketed:ForNegative,NoZero"
    invisible:    if ##K010BValue then yes else no
    setas:        $$AsCrAmt:@@CCBAmtStart
    
    [field:        K010FieldBudgetAmtB]
    use:            AmountField
    style:        Tiny
    Format:         "DrCr"
    setas:        $$AsCrAmt:@@CCBAmtStart
    
    invisible:    yes
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [field:        K010FieldActualAmtCOM]   
    field:        K010FieldActualAmtA, K010FieldActualAmtB,
    [field:        K010FieldActualAmtA]    
    use:            AmountField
    width:        if $$InPrintMode then 10 else 12
    Style:         tiny
    FORMAT:        "Bracketed:ForNegative,NoZero"
    invisible:    if ##K010AValue then yes else no
    setas:        if $$IsDr:$CCAmount then $CCAmount else -$CCAmount
    [field:        K010FieldActualAmtB]
    use:            Amount Field
    display:        CostCentre
    style:        Tiny
    format:        "DrCr"
    setas:        $$AsDrAmt:$CCAmount
    invisible:    yes
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [field:        K010FieldTotalAmtA]     
    use:            Amount Field
    width:        if $$InPrintMode then 10 else 12
    Style:         tiny
    FORMAT:        "Bracketed:ForNegative,NoZero"
    Invisible:     $$NumSets = 0 or (if ##K010ATValue then yes else no)
    setas:        $$AsDrAmt:$$Total:K010FieldActualAmtB
    [field:        K010FieldTotalAmtB]
    use:            Amount Field
    style:        Tiny
    format:        "DrCr"
    setas:        $$AsDrAmt:$$Total:K010FieldActualAmtB
    invisible:    yes
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [field:        K010FieldVarrianceAmtA]
    use:            AmountField
    width:        if $$InPrintMode then 10 else 12
    Style:         tiny
    FORMAT:        "Bracketed:ForNegative,NoZero"
    invisible:    if ##K010VValue then yes else no
    SETAS:        $$AsCrAmt:$$NettAmount:#K010FieldBudgetAmtA:#K010FieldTotalAmtA
    [field:        K010FieldVarrianceAmtB]
    use:            AmountField
    style:        Tiny
    Format:         "DrCr"
    SETAS:        $$AsCrAmt:$$NettAmount:#K010FieldBudgetAmtB:#K010FieldTotalAmtB
    invisible:    yes
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [Field:        K010FieldSNo]
    Use :         NumberField
    SET AS:        $$LINE
    width:        if $$InPrintMode then 2 else 2.5
    Align:         left
    Style:         If $NumChildren > 0 Then "Tiny Bold  Italic" Else "Tiny Italic"
    color:        if $CostCentreDepth=4 then "Black" else if $CostCentreDepth=5 then "Blue" else  "StoneWashRed"
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [Field:        K010FieldMasterID]
    use:            NameField
    width:        if $$InPrintMode then 5 else 5
    setas:        $MasterID
    Style:         If $NumChildren > 0 Then "Tiny Bold  Italic" Else "Tiny Italic"
    color:        if $CostCentreDepth=4 then "Black" else if $CostCentreDepth=5 then "Blue" else  "StoneWashRed"
    invisible:    yes
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    
    [Field:        K010FieldCode]
    Use:            Name Field
    setas:        if $$IsEmpty:$$StringWord:1:@@CodeName = no then $$StringWord:1:@@CodeName else  ""
    width:        if $$InPrintMode then 7 else 8
    color:        if $CostCentreDepth=4 then "Black" else if $CostCentreDepth=5 then "Blue" else  "StoneWashRed"
    invisible:    if ##K010BCode then yes else no
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [Field:        K010FieldName]
    delete:        Alter
    Use:             Name Field
    Use:             DSPAccNameTmpl
    Setas:         $Name
    Style:         If $NumChildren > 0 Then "Tiny Bold" Else if $CostCentreDepth=4 then "Tiny Bold" else "Tiny Italic"
    width:        if $$InPrintMode then 33 else 70
    invisible:    yes
    color:        if $CostCentreDepth=4 then "Black" else if $CostCentreDepth=5 then "Blue" else  "StoneWashRed"
    Variable:    K010Drilldown
    Display:        costcentresummary
    ;Display:        CCVouchers
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [Field:        K010FieldName1]
    delete:        Alter
    Use:             Name Field
    Use:             DSPAccNameTmpl
    setas:        $$StringRemWord:1:$Name
    Style:         If $NumChildren > 0 Then "Tiny Bold" Else if $CostCentreDepth=4 then "Tiny Bold" else "Tiny Italic"
    width:        if $$InPrintMode then 33 else 70
    color:        if $CostCentreDepth=4 then "Black" else if $CostCentreDepth=5 then "Blue" else  "StoneWashRed"
    
    [#Report:    costcentresummary]
    Variable:    K010Drilldown
    ;Object:        costcentre:    ##K010Drilldown
    [#Report:    CCVouchers]
    Variable:    K010Drilldown
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    
    [Border:     K010ColumnTitlesTop]
    Top:         Thick, Full Length
    [Border:     K010ColumnTitlesBottom]
    Bottom:     Thin,  Full Length
    [Border:     K010RowBottom]
    Bottom:     Thick, Full Length
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [Button:     K010CostCentre]
    Title:         "Cost Centre"
    key:         Alt + 1
    Action:         Modify Variables : Cost Centre Name
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [Button:     K010BValue]
    Title:         if ##K010BValue then "View Budget" else "Remove Budget"
    Key:         Alt + 2
    Action:         Set:     K010BValue:     not ##K010BValue
    [Button:     K010AValue]
    Title:         if ##K010AValue then "View Actual" else "Remove Actual"
    Key:         Alt + 3
    Action:         Set:     K010AValue:     not ##K010AValue
    [Button:     K010ATValue]
    Title:         if ##K010ATValue then "View ActualT" else "Remove ActualT"
    Key:         Alt + 4
    Action:         Set:     K010ATValue:     not ##K010ATValue
    [Button:     K010VValue]
    Title:         if ##K010VValue then "View Varriance" else "Remove Varriance"
    Key:         Alt + 5
    Action:         Set:     K010VValue:     not ##K010VValue
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [Button:     K010BCode]
    Title:         if ##K010BCode then "With Code" else "Without Code"
    Key:         Alt + 6
    Action:         Set:     K010BCode:     not ##K010BCode
    [Variable:     K010BValue]
    Type:         Logical
    Persistent:     no
    [Variable:     K010AValue]
    Type:         Logical
    Persistent:     no
    [Variable:     K010ATValue]
    Type:         Logical
    Persistent:     no
    [Variable:     K010VValue]
    Type:         Logical
    Persistent:     no
    [Variable:     K010BCode]
    Type:         Logical
    Persistent:     no
    [Variable:    K010Drilldown]
    Type:                    String
    Volatile:        Yes
    [Button    :     K010Inc]
    Key         :     Alt + 6
    Action     :     Set    : K010Inc    : not ##K010Inc
    Title    :     if not ##K010Inc then "Add Income" else "Remove Income"
    [Variable:     K010Inc]
    Type     :     Logical
    Persistent:     no
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [System:     Variable]
    K010BValue:     YES
    K010AValue:     YES
    K010ATValue:     YES
    K010VValue:     YES
    K010BCode:    yes
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [system:        formula]
    CodeName:    $$StringFindAndReplace:$Name:"-":""
    ;MemoVCH:    $$IsMemo:$VoucherTypeName
    MemoVCH:    $VoucherTypeName contains "DELHI- BUDGET"
    CCBAmtStart:    $$FromValue:@@CmpStartDate:$$ToValue:@@LastVoucherDate:@@CCBAmt
    LocSearchKey:    $Name
    CCBAmt:        $$ReportObject:$$CollectionFieldByKey:$CCVAmount:@@LocSearchKey:K010CollectionC
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [Collection:     K010Collection]        ;;Resultant Collection 1
    Type:        CostCentre
    Childof:     ##pvCostCentreName
    ParmVar:     pvCostCentreName : String : #CostCentreName
    Fetch:        MasterID, Name, OpeningBalance, ClosingBalance, Depth
    COMPUTE:    CCDepth:            $Depth:CostCentre:$Name
    Compute:    HasChildren:        $$NumChildren>0
    compute:    CCAmount:        $$NettAmount:$DebitTotals:$CreditTotals
    Compute:     Alias:             $$Alias
    Compute:     NumChildren:         $$NumChildren
    Compute:     CostCentreDepth:     $Depth:CostCentre:$Name
    Sort:         @@Default:         $$Name
    [Collection:    K010CollectionVoucher]
    Type:         Voucher
    filter:        MemoVCH
    fetch:        MasterID, Date, VoucherNumber, VoucherTypeName,
    ParmVar:     SVFromDate:     Date:     $StartingFrom:Company:##SVCurrentCompany
    ParmVar:     SVToDate:     Date:     $LastVoucherDate:Company:##SVCurrentCompany
    [Collection:    K010CollectionC]        ;; Search Resultant Collection
    Source Collection:     K010CollectionVoucher
    walk ex:                K010CollectionCChild, K010CollectionCParent1, K010CollectionCParent2,
    walkex:                K010CollectionCParent3, K010CollectionCParent4, K010CollectionCParent5
    Keep Source:            ().
    searchkey:            $Name
    [Collection:    K010CollectionCChild]
    Walk:                 AllLedgerEntries, CostCentreAllocations
    By:                     Name:            $Name:CostCentre:$Name
    searchkey:            $Name
    AGGRcompute:        CCVAmount:        Sum:    $Amount
    [Collection:    K010CollectionCParent1]
    Walk:                 AllLedgerEntries, CostCentreAllocations
    By:                     Name:            $Parent:CostCentre:$Name
    searchkey:            $Name
    AGGRcompute:        CCVAmount:        Sum:    $Amount
    [Collection:    K010CollectionCParent2]
    Walk:                 AllLedgerEntries, CostCentreAllocations
    By:                     Name:            $Parent:CostCentre:$Parent:CostCentre:$Name
    searchkey:            $Name
    AGGRcompute:        CCVAmount:        Sum:    $Amount
    [Collection:    K010CollectionCParent3]
    Walk:                 AllLedgerEntries, CostCentreAllocations
    By:                     Name:            $Parent:CostCentre:$Parent:CostCentre:$Parent:CostCentre:$Name
    searchkey:            $Name
    AGGRcompute:        CCVAmount:        Sum:    $Amount
    [Collection:    K010CollectionCParent4]
    Walk:                 AllLedgerEntries, CostCentreAllocations
    By:                     Name:            $Parent:CostCentre:$Parent:CostCentre:$Parent:CostCentre:$Parent:CostCentre:$Name
    searchkey:            $Name
    AGGRcompute:        CCVAmount:        Sum:    $Amount
    [Collection:    K010CollectionCParent5]
    Walk:                 AllLedgerEntries, CostCentreAllocations
    By:                     Name:            $Parent:CostCentre:$Parent:CostCentre:$Parent:CostCentre:$Parent:CostCentre:$Parent:CostCentre:$Name
    searchkey:            $Name
    AGGRcompute:        CCVAmount:        Sum:    $Amount
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Coding
    [Report:     K010ReportColumn]
    Use:             Configure Column Template
    Local:         Part:     Modify Variables:     Lines:             SVCurrentCompany, SVFromDate, SVToDate,
    
     


  2. kapil22

    kapil22 Member


    Is somebody help on this?
     


Share This Page