Announcements
Hello,
we have duplicated the "TaxReportById" report and corresponding contract and DP class.
I have modified the query as we want the report to be crosscompany. (query.AllowCrossComapny(true)) and I have just hardcoded the legal entity codes to test. It works as expected, but I want to make the selection of companies on the dialog that is opened by menu item.
It must be possible to select several legal entities and pass somehow to processReport to build a query correctly.
How can I achieve it? Any examples would be appreciated.
Thanks
Maybe you don't understand the impact of allowCrossCompany(true) on the query dialog. Try a simple example:
Query q = new Query(); q.addDataSource(tableNum(CustGroup)); QueryRun qr = new QueryRun(q); qr.allowCrossCompany(true); qr.prompt();
Hmm, now I reaally don't understand. You seem to be saying that your code work as expected, except of that it doesn't work.
I don't think you understand the question correctly. I mentioned that the code works as expected. All I ask is how to have that "Company range" on the dialog form.
No, I didn't try to reproduce your particular changes. It's not necessary to demonstrate the thing you asked about, it would took too much time and - more importantly - you didn't tell us what exactly you did.
If you try test many things at once, you then don't know which one is causing a problem. Test the query in isolation to see that company ranges are indeed set at the tab I showed. When you agree that it works, look at your changes in the form and try to identify your bug there. For example, you may be calling allowCrossCompany() at a wrong place. If you fail to fix your code, come back here and show your code to us.
Unfortunetelly, there is only "Range" and "Sorting" tabs on this report.
Is the screenshot for TaxReportById report?
You should see a separate tab in the query dialog. Below is how it looks like in D365FO, it was similar in AX 2012.
André Arnaud de Cal...
294,120
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator