Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

SSRS report multi selection of entities on dialog

Posted on by 6,414

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

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,149 Most Valuable Professional on at
    RE: SSRS report multi selection of entities on dialog

    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();

  • Martin Dráb Profile Picture
    Martin Dráb 230,149 Most Valuable Professional on at
    RE: SSRS report multi selection of entities on dialog

    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.

  • Johnny Profile Picture
    Johnny 6,414 on at
    RE: SSRS report multi selection of entities on dialog

    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.

  • Martin Dráb Profile Picture
    Martin Dráb 230,149 Most Valuable Professional on at
    RE: SSRS report multi selection of entities on dialog

    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.

  • Johnny Profile Picture
    Johnny 6,414 on at
    RE: SSRS report multi selection of entities on dialog

    Unfortunetelly, there is only "Range" and "Sorting" tabs on this report.

    Is the screenshot for TaxReportById report?

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,149 Most Valuable Professional on at
    RE: SSRS report multi selection of entities on dialog

    You should see a separate tab in the query dialog. Below is how it looks like in D365FO, it was similar in AX 2012.

    CompanyFilter2.PNG

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans