Database error after deleting copied report

Eddy
Posts: 121
Joined: 28 Dec 2017, 03:38
Name: Eduardo
Location: UK

Re: Database error after deleting copied report

Post by Eddy »

Hi Sergey,

The new code solved the database error but left behind a couple of issues

1) After deleting the copied report, the original report lost the parent filter definition (see picture). If you click the add filter button an error pops up that says "report not found" in the middle of the screen and you have to kill the application and start again because there is no way to come out of it (that I could find).

2) To solve the issue in (1), I also deleted the original report and created it again. It worked fine as the missing parent entity was back. I then made a copy of this newly created report and changed the child and parent filters, so that I had a different report based on the original. The problem now is that the application is ignoring the update to the parent filter and it is still taking the definition of the filter from the original, despite the GUI saying that is using the filter definition that I need.

Please let me know if you need more information.
Attachments
issue 1.png
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Database error after deleting copied report

Post by support »

You want to say you create new report and it's ignoring filters for parent entity?
But does Project entity have parents in your app?
Eddy
Posts: 121
Joined: 28 Dec 2017, 03:38
Name: Eduardo
Location: UK

Re: Database error after deleting copied report

Post by Eddy »

We manufacture bespoke exhibition stands and our projects are grouped by exhibition show, so that one exhibition show has many projects or stands. In my application "Show" is the parent and "Project" is its child for a one to many relation.

The issue I was trying to describe is related to the definition of the report filters, per my picture in the previous post.

There are two separate issues:

1) When you delete a copy of a report, the filter definitions of the original gets damaged. The filters of the parent entity get deleted and the name reference of the entity also gets lost (in my picture the arrow points to the name of the entity and in my case it should read "Show" (the name of the parent entity). Moreover, when clicked, the add filter button shows and error message that say "table not found" and I had to close the browser (restart the application).

2) The second issue refers to creating a report using the copy function. In this case I copied the report and then modified the filters to show the information I needed. The problem I think is that internally (the GUI egts updated correctly) the filters are not being updated so the the presented report looks for the correct conditions for the child but within the old set of conditions for the parent, so it would be something like this:

Original report says:

Display All "Projects" where Field 1 meets condition 1 and condition 2 and belong to "Shows" that meet condition 3.

Copied & updated filters report says (note: GUI looks okay after filter updates):

Display All "Projects" where Field 1 meets condition 4 and condition 5 and belong to "Shows" that meet condition 4.

The results shown for the copied report look like this:

Display All "Projects" where Field 1 meets condition 4 and condition 5 and belong to "Shows" that meet condition 3.
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Database error after deleting copied report

Post by support »

Finally I have found bug in Copy function in report. It does not copy parent and use parent reports from previous report that is why you have this issue.
You have to remove reports that you create using Copy function and just create new reports manually.

Once I will fix it I will provide file with fix.
Eddy
Posts: 121
Joined: 28 Dec 2017, 03:38
Name: Eduardo
Location: UK

Re: Database error after deleting copied report

Post by Eddy »

Okay no problem and thanks
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Database error after deleting copied report

Post by support »

I have fixed issue with copy reports. File from archive replace to includes\classes\reports\
Let me know if it works ok now.
Attachments
reports.zip
(8.16 KiB) Downloaded 133 times
Eddy
Posts: 121
Joined: 28 Dec 2017, 03:38
Name: Eduardo
Location: UK

Re: Database error after deleting copied report

Post by Eddy »

Hi Sergey,

As far as I can tell it is all working okay now.

Thanks
Ed.
Post Reply