Options

Trial Balance Report Export to Excel with Show Amounts ACY

Vineeth.RVineeth.R Member Posts: 121
Dear All,

Trial Balance Report (ID-6) when run with Export to Excel and Show Amounts ACY option tselected shows blank figures. If Export to Excel is not turned on then there is figures in the preview.

I noticed this in version 4sp3, version5 and also in 2009SP1 and 2009R2.

Show Amounts ACY is not more in version 2013.

any fix or hot fix available? i couldn't find any.

Thanks
Vineeth
Thanks and Regards
Vineeth.R

Comments

  • Options
    Vineeth.RVineeth.R Member Posts: 121
    Hi Friends,

    I have fixed the problem in the report.

    Here is the Fix:

    1. In the G/L Account - OnAfterGetRecord() function i modified the below code

    IF PrintToExcel AND (NOT UseAmtsInAddCurr) THEN
    MakeExcelDataBody
    ELSE
    MakeExcelDataBodyAddCurr;

    2. Created a new function similar to MakeExcelDataBody for the ACY part.

    PROCEDURE MakeExcelDataBodyAddCurr@1000000000();
    VAR
    BlankFiller@1000000000 : Text[250];
    BEGIN
    BlankFiller := PADSTR(' ',MAXSTRLEN(BlankFiller),' ');
    ExcelBuf.NewRow;
    ExcelBuf.AddColumn(
    "G/L Account"."No.",FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,
    FALSE,FALSE,'');
    IF "G/L Account".Indentation = 0 THEN
    ExcelBuf.AddColumn(
    "G/L Account".Name,FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,
    FALSE,FALSE,'@')
    ELSE
    ExcelBuf.AddColumn(
    COPYSTR(BlankFiller,1,2 * "G/L Account".Indentation) + "G/L Account".Name,
    FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,FALSE,FALSE,'@');

    CASE TRUE OF
    "G/L Account"."Additional-Currency Net Change" = 0:
    BEGIN
    ExcelBuf.AddColumn(
    '',FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,FALSE,FALSE,'');
    ExcelBuf.AddColumn(
    '',FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,FALSE,FALSE,'');
    END;
    "G/L Account"."Additional-Currency Net Change" > 0:
    BEGIN
    ExcelBuf.AddColumn(
    "G/L Account"."Additional-Currency Net Change",FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,
    FALSE,FALSE,CurrFormat);
    ExcelBuf.AddColumn(
    '',FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,FALSE,FALSE,'');
    END;
    "G/L Account"."Additional-Currency Net Change" < 0:
    BEGIN
    ExcelBuf.AddColumn(
    '',FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,FALSE,FALSE,'');
    ExcelBuf.AddColumn(
    -"G/L Account"."Additional-Currency Net Change",FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,
    FALSE,FALSE,CurrFormat);
    END;
    END;

    CASE TRUE OF
    "G/L Account"."Add.-Currency Balance at Date" = 0:
    BEGIN
    ExcelBuf.AddColumn(
    '',FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,FALSE,FALSE,'');
    ExcelBuf.AddColumn(
    '',FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,FALSE,FALSE,'');
    END;
    "G/L Account"."Add.-Currency Balance at Date" > 0:
    BEGIN
    ExcelBuf.AddColumn(
    "G/L Account"."Add.-Currency Balance at Date",FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,
    FALSE,FALSE,CurrFormat);
    ExcelBuf.AddColumn(
    '',FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,FALSE,FALSE,'');
    END;
    "G/L Account"."Add.-Currency Balance at Date" < 0:
    BEGIN
    ExcelBuf.AddColumn(
    '',FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,FALSE,FALSE,'');
    ExcelBuf.AddColumn(
    -"G/L Account"."Add.-Currency Balance at Date",FALSE,'',"G/L Account"."Account Type" <> "G/L Account"."Account Type"::Posting,
    FALSE,FALSE,CurrFormat);
    END;
    END;

    END;
    Thanks and Regards
    Vineeth.R
Sign In or Register to comment.