Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Help for SSRS report for multi-Table (Parants & Child)

(0) ShareShare
ReportReport
Posted on by 305

Hello All,

I need  make a SSRS report, but I Still could not success.

I used SQL is Fine but no work in AX...

I want to show the SSRS report:

1. Table relation is :

   1) VendTable (V) join PurchTable  (P) on V.AccountNum = OrderAccount ( AX Query I choice the 1:N inner join)

   2) PurchTable (P) join PurchLine (PL) on P.PurchId = PL.PurchId  ( AX Query I choice the 1:N inner join)

   3) PurchTable (P) join VendPackingSlipJour (PJ) on P.PurchId = PJ.PurchId  ( AX Query I choice the 1:N inner join)

   4) VendPackingSlipJour (PJ) joine VendPackingSlipTrans (PT) on PJ.RecId = PT.VendPackingSlipJour  ( AX Query I choice the 1:N inner join)

   5) in SQL I still use the relation on PurchLine (PL).ItemId = VendPackingSlipTrans (PT).ItemId

otherwise I will get the one more the same transaction.

2. I need the SSRS Report to show:

Head:

  1)Vend Account Number (V.account)

  2)Vend Account Name (P.PurchName)

  3) Business Rate (V.TaxGroup)

  4) V.PaymtermId

  5) V.Currency

Detail:

  1) PJ.PurchId

  2) PL.LineNumber

  3) PT.ItemId

  4) PT.Name

  5) PL.PurchQTY

  6) PT.QTY

  7) PL.RemainInventFinancial

  8) P.InclTax

  9) PL.PurchPrice

  10) PJ.PackingSlipId

  11) PJ.DeliveryDate

This Report the purpose is

Find the PO that have post the product receipt but had no Invoice.

It is work when I use SQL and export the Data to Excel.

but 

In AX I try many way in AOT-Query....but no work especially in SSRS report, Data is empty or no in the one line.

Have some one could performance this case for me.

I very appreciation u.

Thanks in advance.

Br, Jen

*This post is locked for comments

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: Help for SSRS report for multi-Table (Parants & Child)

    Don't try to test everything at once. If your query doesn't work, there is no in using it in a report; it merely makes your debugging more complicated.

    So... please test your query first. If it doesn't return what you expect, look at what SQL code was generated from your AOT query. It usually makes some bugs easier to spot ad you can also compare it with your SQL query.

    And if you find that your query works, you'll know that your problem isn't in the query itself; it must be in how you're using it.

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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans