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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Purchase Agreement > Fulfillment: How Can I Get These Values in an SSRS Report?

(1) ShareShare
ReportReport
Posted on by 1,013

Hello awesome community!

I'm creating an SSRS report and I want to get these following fields data, my problem is that I don't know from where can I get them.

Here is the screenshot:

63760.Capture.PNG

I tried to right click > Personalize but it seems it's not derived from a table.

How can I get them?/ Where can I find the code that calculates them?

Thanks in advance!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Momochi Profile Picture
    1,013 on at
    RE: Purchase Agreement > Fulfillment: How Can I Get These Values in an SSRS Report?

    I was able to get the "Remaining" quantity using this "AgreementLine" table method: "quantityRemainingRelease()"

    But still didn't find anything for the other 3 fields.

  • Momochi Profile Picture
    1,013 on at
    RE: Purchase Agreement > Fulfillment: How Can I Get These Values in an SSRS Report?

    I tried to copy the same code that the form is using to calculate the fulfillment fields.

    It looks like it's working but my problem is that it now shows the same values for all the lines in the report.

    I want it to bring the correct values for each line.

    Here is my DP's processReport() code:

    public void processReport()
    {
        //Table Objects
        AgreementLine   agreementLi;
    
        //Container Delaration for Fulfillment Calculations
        #AgreementsRemains
        container fulfillmentValues; 
    
    
        //Query Stuff
        Query                   query;
        QueryRun                qr;
        QueryBuildDataSource    qbds1;
        
        //Query Reference Object
        query   = this.parmQuery();
        
        //Query Loop
        qr = new QueryRun(query);
        while(qr.next()){
            agreementLi = qr.get(tableNum(AgreementLine));
            
            reportLine.ItemId = agreementLi.ItemId;
            reportLine.ItemName = agreementLi.name();
            reportLine.PurchNumberSequence = PurchAgreementHeader::find(agreementLi.Agreement).PurchNumberSequence;
            
            fulfillmentValues += AgreementLine::calculateFulfillmentForLine(agreementLi);
    
            // Distributing them among fulfillment fields.
            reportLine.Received = conPeek(fulfillmentValues, #DeliveredNotInvoicedIndex);
            reportLine.Invoiced = conPeek(fulfillmentValues, #InvoicedIndex);
            reportLine.Remaining= conPeek(fulfillmentValues, #RemainingIndex);
            reportLine.Released = conPeek(fulfillmentValues, #ReleasedNotInvoicedNorDeliveredIndex);
            
            reportLine.insert();
        }
    }

    As you can see I used the "AgreementLine::calculateFulfillmentForLine():" method. It returns the values as a container, and it takes an instance of "AgreementLine" Table as a parameter.

    But as I said, it works but it shows the same value for all the lines.

    How can I get the values for each line?
    Any suggestions would be appreciated :)

    Thanks!

  • Suggested answer
    Momochi Profile Picture
    1,013 on at
    RE: Purchase Agreement > Fulfillment: How Can I Get These Values in an SSRS Report?

    I found this method "calculateFulfillmentForLine()" in the "AgreementLine" Table which the form I captured uses it to calculate the fulfillment.

    Here is a screenshot of the method:

    5775.Capture.PNG

    It takes an "AgreementLine" and returns the values as a container.

    I'm not sure about it yet, so I will try and give my feedback :)

    Thanks.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Mea_ Profile Picture

Mea_ 4

#3
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans