Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

AX 2009 Report Design Assistance Multiple Data sources, joins,views

Posted on by 1,180

When creating an ax report.

Is it possible to:

1. Use a view as a data source?  This seems to work, but if I add a new datasource to the view, it wipes out all fields and I have to drag and drop all fields back to the "view fields" and report.

2. Should adding a datasource and a subdata source to the report itself work?  It seems like the body section of the report is only limited to one datasource??? 

3. How do I do a left join in a view datasource or report data source?

4. Is there a way to generate multiple reports at the same time? and print them all?

I was hoping these things were able to be accomplished without writing code, but I think code writing is inevitable..

Thoughts? Tips? Help?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: AX 2009 Report Design Assistance Multiple Data sources, joins,views

    Hi Chris,

    1)  I would not recommend using a view as a datasource on an ax report.  Any view that you may want to use can be replicated using tables as datasources (and necessary joins).

    2) Datasources in reports are based off of queries.  When you add a query datasource, you can then add another datasource within it.  And repeat again and again if needed.  You can set the joinMode, FetchMode within the datasources properties.

    3)  You can create more in depth reports by coding your queries directly into the fetch() method of the report.  You can use the query class to define your queries (Query, QueryRun, QueryBuildDataSource).  There is a bunch of documentation on the web to assist you.  Also, see the JoinMode options, you can use OuterJoin or JoinNoExists options to left join.

    4)  You can create either a job or a class that uses QueryRun multiple times to generate multiple reports.  See documentation on QueryRun.

    You are correct, some custom code will need to be written.

    Hope this helps.

    Kind regards.

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