Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

how to add financial dimension values in ssrs report

Posted on by 325

hi all i am doing sales order report and i want to add financial dimensions also for that report how add?????

thanks in advance...

  • karthik143 Profile Picture
    karthik143 325 on at
    RE: how to add financial dimension values in ssrs report

    yes.........archana

  • Suggested answer
    Archie Profile Picture
    Archie 455 on at
    RE: how to add financial dimension values in ssrs report

    Billion Thanks to you 'Chandra Setiawan' :D It worked!!!. You are a life saver...I cant thank you enough

  • Archie Profile Picture
    Archie 455 on at
    RE: how to add financial dimension values in ssrs report

    No problem. Thanks :)

  • Suggested answer
    RE: how to add financial dimension values in ssrs report

    and make sure after you run the report check from SQL or table browser make sure the custAgingReportTmp.finloc has been populated.
    If populated in table and not SSRS print preview then the problem is not your code.

    What Crispin idea would be following:

    in the class CustAgingReportDP.processReport() at last line you call new method.

    void ProcessReport()

    {

          //axstandardcode....

          this.CWSUpdateFinanceLog();

    }


    then the method more or less is as follow:

    protected void CWSUpdateFinanceLog()
    {
    DefaultDimensionView defaultdimensionview;
    CustTable custTable;
    while select forupdate custAgingReportTmp
    {
    custTable = custTable::find(custAgingReportTmp.accountNum);
    select firstonly displayvalue from defaultdimensionview
    where defaultdimensionview.DEFAULTDIMENSION == custTable.DEFAULTDIMENSION
    && defaultdimensionview.REPORTCOLUMNNAME = 'FINLOC';
    custAgingReportTmp.finLoc = defaultdimensionview.displayValue;
    custAgingReportTmp.update();
    }

    }






  • Archie Profile Picture
    Archie 455 on at
    RE: how to add financial dimension values in ssrs report

    But um,. if I add my code here it would add the dimension(financial loc.) to the customer balance list instead of customer aging right ??

  • Archie Profile Picture
    Archie 455 on at
    RE: how to add financial dimension values in ssrs report

    Wow..thanks for the idea.. why did'nt it occur to me.. I trying it out now, will let you know the results :)

  • Archie Profile Picture
    Archie 455 on at
    RE: how to add financial dimension values in ssrs report

    Thanks for your reply @Chandra Setiawan. I have actually done something similar to this but unable to achieve the result. Kindly let me know what I am missing

    My requirement: to add customer 'financial location' to customer aging report at header level.

    things I have done to achieve this: 1. added a new field called  'CustFinLoc' in both custTmpAccountSum, custAgingReporTmp and custAgingReportTmp

    2. In custBalanceList.insertIntoTmpAccountSum() added the below code:

     while  select firstOnly custTable

               where custTable.AccountNum == _toCustVendTable.AccountNum

           join DisplayValue from dimAttrView

               where dimAttrView.ValueCombinationRecId == custTable.DefaultDimension

           join Name from dimAttr

                   where dimAttr.RecId == dimAttrView.DimensionAttribute

           {

            dimStorage = DimensionAttributeValueSetStorage::find(custTable.DefaultDimension);

          // if(DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name == 'FINANCIALLOCATION')

           //{

               for (i=1 ; i<= dimStorage.elements() ; i++)

               {

                   if(DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name == 'FINANCIALLOCATION')

                   {

                       finDim = dimStorage.getDisplayValueByIndex(i);

                   }

               }

           }

               agingCalculatedTmp.CustFinLoc = finDim;

    // in the above code my idea was to insert this custFinLoc in agingCalculatedTmp table

    but I am aware that unless I call insert() this wont insert, but if I do, it throws an error 'çant insert multiple customer/vendor accounts, record already exists'.

    So please help me out here :( Do you think I will have to insert a similar new field to capture finLoc in 'ágingCalculatedTmp' and use this code in CustVendAgingCalculation.process() instead? but this table gets its data from agingProcessingTmp and agingProcessingDetailsTmp tables. so there is no ending to this backtracking, I am confused

    3. In this step my idea is to insert the fields  from agingCalculatedTmp table to custTmpAccountSum  table with the below code: (I just added CustFinLoc to the first select stmt)

                 insert_recordset custTmpAccountSum (CurrencyCode, BillingClassification, InvoiceId, TransDate, Txt, Voucher, AccountNum, Name, GroupId, CustFinLoc)

               select CurrencyCode, BillingClassification, InvoiceId, TransDate, Txt, Voucher, CustFinLoc

                   from agingCalculatedTmp

                   group by CurrencyCode, BillingClassification, TransDate, InvoiceId, Voucher, Txt

                   join AccountNum, Name, GroupId from toCustomer

                       group by AccountNum, Name, GroupId

                   notexists join custTmpAccountSum // Avoid inserting a duplicate

                       where custTmpAccountSum.AccountNum == _toCustVendTable.AccountNum

                               &&  agingCalculatedTmp.CurrencyCode == custTmpAccountSum.CurrencyCode

                               &&  agingCalculatedTmp.BillingClassification == custTmpAccountSum.BillingClassification

                               &&  agingCalculatedTmp.TransDate == custTmpAccountSum.TransDate

                               &&  agingCalculatedTmp.InvoiceId == custTmpAccountSum.InvoiceId

                               &&  agingCalculatedTmp.Voucher == custTmpAccountSum.Voucher

                               &&  agingCalculatedTmp.Txt == custTmpAccountSum.Txt;

    4. Next I inserted the newly added column 'çustFinLoc' from custTmpAccountSum table

    to custAgingReportTmp table in CustAgingReportDP.insertCustAgingReportTmp() by just adding the field names to the list of already existing selected fields

    5. Added a new field in all 4 report designs which takes custAgingReportTmp .custFinLoc as input

    When I compile all objects and deploy report I dont get any error but data is blank on the newly added field (screenshot below)

    Can someone kindly help me understand where I am going wrong here :(

    FinLoc.PNG

  • Suggested answer
    Muhammad Zahid Profile Picture
    Muhammad Zahid 480 on at
    RE: how to add financial dimension values in ssrs report

    This might help you.

    codingchamp.blogspot.co.nz/.../getting-financial-dimension-values.html

    Thanks,

    Zahid

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans