ReportRunView is not filtered by associated view ids

Hi,

We have a similar issue like this: Reports not filtered on view · Issue #2945 · jmix-framework/jmix · GitHub
The difference is that we have multiple views for the same entity and different reports are available for the given entity depending on the views. Currently, all reports are available in the ReportRunView regardless of the views set for the reports. We see that the ReportSecurityManager queries the reports correctly and passes this list to the ReportRunView, however, the ReportRunView load delegate ignores this and loads the available reports again but the screen parameter is not set.

Thanks,
Peter

Hi,

What Jmix version do you use?

Regards,
Ivan

Hi,

2.6.1

Hi Peter
I apologize for taking so long to get an answer. I tried to reproduce the problem according to your description.
In my example. There is a Customer entity. Two reports were created for it: Customer and Customer (2). Each of the reports was run 3 times. But if you select one of them and open the Execution history, all launches of all reports for the Customer entity will be visible (A total of 6). Is that what you meant?
Please clarify: maybe I missed something.

Hi Dmitry,

Sorry if my description was not clear.

Please add the following to your example

  • create two listviews for the Customer entity
  • add a report run action to both listviews
  • set the two existing reports so that one is only available on one listview and the other only on the other (on Roles and views tab of the Report detailview)

When executing the above action on the listviews, both reports can be selected in the report run dialog window regardless of which view they were assigned to.

I hope this additional information helps you reproduce the problem.

Thank you for your more detailed answer. This will really help to reproduce the problem more accurately.

Hi Peter!
Working on the latest version of Jmix took a lot of time. I now have enough time to address your question.

I tried to reproduce the issue following your recommendations, but I couldn’t. Run actions in views work as expected, and no unexpected errors were found.

Brief description:
There’s a Customer entity. Two listViews have been added to it. In this case, they are Customers1 and Customers2. ReportRun actions have been implemented in the listView data.

image
image

Two reports have also been created for the Customer entity.
image

One is available only for Customer1.list
image

the other only for Customer2.list
image

Result of clicking RunReport action for Customers1
image

Result of clicking RunReport action for Customers2
image

I was running the same version of Jmix as you: 2.6.1

You may not have clicked the Add button when selecting a view to display in the report settings.

image

Please ensure that after selecting the desired view in the drop-down list of views, you click the Add button so that this view appears in the list below. You must also explicitly apply the changes to the report.

(This tip seems simple, but it’s a very common mistake to simply forget to click the Add button for selected view in drop-down list of views)

Thank you, Dmitry.
That is weird, sorry for the extra work.
We will create a new project for this and investigate further on our side.

One thing that came to mind. We used the io.jmix.reportsflowui.action.RunListEntityReportAction on the listview instead of the io.jmix.reportsflowui.action.RunReportAction.
We tried the RunReportAction and that is working indeed.
Sorry I wasn’t clear on that.

Helping is also our job =)
It’s good that the situation has been resolved. Thank you for your trust, and good luck with your future projects!

Okay, I have serious problems expressing myself :smiley:
So the problem with the io.jmix.reportsflowui.action.RunListEntityReportAction is still exist.

I think you used the io.jmix.reportsflowui.action.RunReportAction. If yes then could you check the io.jmix.reportsflowui.action.RunListEntityReportAction as well?

It’s okay)
We all have this problem, to one degree or another.

Yes, I used io.jmix.reportsflowui.action.RunReportAction.

Thanks for the clarification. I tested it using io.jmix.reportsflowui.action.RunListEntityReportAction. And yes, indeed: the bug appeared in version 2.6.1 and 2.6.2 too…

1-error

However, this bug has been fixed in version 2.7 (will be released tomorrow or the day after).

image

image

Great news that it is fixed. We will update to 2.7 when it is released.
Thanks for your help and patience :slight_smile:

You’re welcome! And good luck)