Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

How to get sum of field(totalcostamountcur) from ProjEmplTable in Existing Report

Posted on by Microsoft Employee

Hi Everyone,

i am having problem in adding other table data (ProjEmplTable) in Existing report.

I have an existing report name "Project Throughput report Summary" and i want to add sum of field

named TotalCostAmountCur  from ProjEmplTable.

Required :

1. I want to display sum of TotalCostAmountCur filtered/based on Proj id and LineProperty=Billable on my existing report.

Can someone guide me where i put the select code to get the Proj ID  and LineProperty=Billable based data from ProjEmplTable in existing report.

thank you in advance

please see the image for further details.

note :  i have modify existing x++ query to prepare my "Project Throughput report Summary

report-query-_2D00_-jpg.JPG

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to get sum of field(totalcostamountcur) from ProjEmplTable in Existing Report

    TamilSelvan it Works - Thanks a lot dear :)

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to get sum of field(totalcostamountcur) from ProjEmplTable in Existing Report

    okay let me try - thank you

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to get sum of field(totalcostamountcur) from ProjEmplTable in Existing Report

    Before the insert you can write the condition like

    select sum(TotalCostAmountCur) from projEmplTrans where projEmplTrans.ProjId == YourTemptable.ProjId && projEmplTrans.LinePropertyId == "Billable";

    YourTemptable.TotalCostAmountCur = projEmplTrans.TotalCostAmountCur;

    //This below insert will the existing insert in your dp class..

    YourTemptable.insert();

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to get sum of field(totalcostamountcur) from ProjEmplTable in Existing Report

    thanks for your reply

    Actually in my existing report there are multiple Projects(Proj id). How it can be filtered ? can you please elaborate more ?

    thanks

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to get sum of field(totalcostamountcur) from ProjEmplTable in Existing Report

    Hi Maqbool Niazi,

    You can write the select statement with required condition, just above the insert by selecting particular projId (temporary table - ProjId).

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,134 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,928 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans