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
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,134 Super User 2024 Season 2
Martin Dráb 229,928 Most Valuable Professional
nmaenpaa 101,156