web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

how to add the account name in actual vs budget report

(0) ShareShare
ReportReport
Posted on by 1,737

i want to display the name of the Main account in actual vs budget report in ax 2012 r3.

how to do this..

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    Could you please stop adding the whole title as a tag? Tags are for classification and tags like "how to add the account name in actual vs budget report" don't do the job very well.

    Also, Microsoft Dynamics AX (current version) means AX 7, not AX 2012.

    Thank you in advance. I'll really appreciate if I get time for answering questions instead of fixing titles and tags.

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello Srinivas,

    Why you want to adjust something here and generate a SSRS Report? Management Reporter provides this functionality out of the box.

    Ludwig

  • srinivas pamidi Profile Picture
    1,737 on at

    Hai Ludwing,

    User want it.

    Actually In this Report Main account is Visible..

    User wants the Main Account Name Beside Account..

    I am Tried it and Adding the Field in the "BudgetTmpBalance" table

    and write the Below code in the "BudgetBalancesActualsDP" Class

    "SumBudegtTmpBalance" Method..

    select mainAccount

               where mainAccount.MainAccountId == budgetTmpBalance.DimensionFocus;

               budgetTmpBalance.SG_Name = mainAccount.localizedName();

    But it is not showing any value in the Report..

    When i am Trying to Debug it It is Showing Only the First Main Account Name..

    Can you Please Give me the Answer..

    How to Do this.

  • Anoop Tripathi Profile Picture
    790 on at

    Can you share your code. Also did you try to execute test code in job ?

  • srinivas pamidi Profile Picture
    1,737 on at

    i am already test it in job..

    But data is not coming in report..

    facing problem  with the Report Design.

  • Anoop Tripathi Profile Picture
    790 on at

    Is you code at the end part of method sumBudgetTmpBalance using the dimfocus ? or is it withing of the if else conditions ?

  • srinivas pamidi Profile Picture
    1,737 on at

    i don't where exactly write the Code..

    Please find the Below code I am write in the first if Condition.

    /// <summary>

    ///    Sums the temporary table data.

    /// </summary>

    /// <returns>

    ///    The budget amounts in a <c>BudgetTmpBalance</c> temporary table.

    /// </returns>

    public BudgetTmpBalance sumBudgetTmpBalance()

    {

       BudgetTmpBalance           budgetTmpBalanceLocal;

       BudgetControlConfiguration budgetControlConfiguration;

       // Temp table could contain multiple records for each dimension focus \ budget model combination; sum up all the common combinations.

       if (isConfigurationkeyEnabled(configurationKeyNum(PublicSector)))

       {

           budgetControlConfiguration = BudgetControlConfiguration::findActiveByPrimaryLedger(Ledger::current());

           while select sum(OriginalAmount), sum(RevisedAmount), sum(LedgerAmount), sum(Variance), sum(PreliminaryAmount), sum (ApportionmentAmount)

               from budgetTmpBalance

               group by BudgetModelId, DimensionFocus, Period

           {

               budgetTmpBalance.UseOnlyApportionment = budgetControlConfiguration.UseApportionedAmount;

               budgetTmpBalance.SumPreliminaryBudget = budgetControlConfiguration.SumPreliminaryBudget && !budgetTmpBalance.UseOnlyApportionment;

               select mainAccount

               where mainAccount.MainAccountId == budgetTmpBalance.DimensionFocus;

               budgetTmpBalance.SG_Name = mainAccount.localizedName();

               buf2Buf(budgetTmpBalance, budgetTmpBalanceLocal);

               if (contract.parmBudgetType() == BudgetType::Revenue)

               {

                   // Invert Revenue amounts. This will only occur for the chart because the BudgetType parameter isn't exposed elsewhere.

                   budgetTmpBalanceLocal.RevisedAmount = budgetTmpBalanceLocal.RevisedAmount * -1;

                   budgetTmpBalanceLocal.LedgerAmount = budgetTmpBalanceLocal.LedgerAmount * -1;

               }

               if (budgetTmpBalanceLocal.UseOnlyApportionment)

               {

                   budgetTmpBalanceLocal.PercentOfBudget = (budgetTmpBalanceLocal.ApportionmentAmount == 0 || budgetTmpBalanceLocal.Variance == 0)?0: budgetTmpBalanceLocal.Variance / budgetTmpBalanceLocal.ApportionmentAmount;

                   budgetTmpBalanceLocal.VariancePercent = (budgetTmpBalanceLocal.ApportionmentAmount == 0 || budgetTmpBalanceLocal.LedgerAmount == 0)?0: budgetTmpBalanceLocal.LedgerAmount / budgetTmpBalanceLocal.ApportionmentAmount;

               }

               else

               {

                   budgetTmpBalanceLocal.PercentOfBudget = (budgetTmpBalanceLocal.RevisedAmount == 0 || budgetTmpBalanceLocal.Variance == 0)?0: budgetTmpBalanceLocal.Variance / budgetTmpBalanceLocal.RevisedAmount;

                   budgetTmpBalanceLocal.VariancePercent = (budgetTmpBalanceLocal.RevisedAmount == 0 || budgetTmpBalanceLocal.LedgerAmount == 0)?0: budgetTmpBalanceLocal.LedgerAmount / budgetTmpBalanceLocal.RevisedAmount;

               }

               budgetTmpBalanceLocal.insert();

           }

       }

       else

       {

           while select sum(OriginalAmount), sum(RevisedAmount), sum(LedgerAmount), sum(Variance) from budgetTmpBalance

               group by BudgetModelId, DimensionFocus, Period

           {

               buf2Buf(budgetTmpBalance, budgetTmpBalanceLocal);

               if (contract.parmBudgetType() == BudgetType::Revenue)

               {

                   // Invert Revenue amounts. This will only occur for the chart because the BudgetType parameter isn't exposed elsewhere.

                   budgetTmpBalanceLocal.RevisedAmount = budgetTmpBalanceLocal.RevisedAmount * -1;

                   budgetTmpBalanceLocal.LedgerAmount = budgetTmpBalanceLocal.LedgerAmount * -1;

               }

               budgetTmpBalanceLocal.PercentOfBudget = (budgetTmpBalanceLocal.RevisedAmount == 0 || budgetTmpBalanceLocal.Variance == 0)?0: budgetTmpBalanceLocal.Variance / budgetTmpBalanceLocal.RevisedAmount;

               budgetTmpBalanceLocal.VariancePercent = (budgetTmpBalanceLocal.RevisedAmount == 0 || budgetTmpBalanceLocal.LedgerAmount == 0)?0: budgetTmpBalanceLocal.LedgerAmount / budgetTmpBalanceLocal.RevisedAmount;

               budgetTmpBalanceLocal.insert();

           }

       }

       return budgetTmpBalanceLocal;

    }

  • Anoop Tripathi Profile Picture
    790 on at

    I would not suggest putting it at one of the if else etc. places unless you have a specific need to print the account name if specific condition is met.

    As it seems here you need to print the name in all cases so better put it at just before all insert condition as you need the name with each record.

  • srinivas pamidi Profile Picture
    1,737 on at

    Tell Me where i put the Code Excatly.

  • Anoop Tripathi Profile Picture
    790 on at

    Like I said "just before all the insert"  so just add your code before all the insert statements of that method.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans