Jasper Reports : "Not found'' message on page load

Hi @luisfmfernandes
Whenever I open a doctype that has a Jasper Report associated to it, I get ‘Not Found’ message popup. The js console says: Failed to load resource: the server responded with a status of 404 (NOT FOUND).

The doctype and the Jasper report get displayed without any problems though. Also, this popup doesnt appear when I login as Administrator.

I have checked JasperLocal.py and JasperBase.py where you are throwing ‘Not found’ message. The one I get doesn’t seem to be from any of them.

Any clues?

Thanks

Hi.
Go to jasperserverconfig doctype and check if you do not have choose both in Use JasperServer / Local jrxml. I don’t get any error with another user.

I could find that its been thrown from request.js

frappe.request.call = function(opts) {
frappe.request.prepare(opts);

    var statusCode = {
            200: function(data, xhr) {
                    if(typeof data === "string") data = JSON.parse(data);
                    opts.success_callback && opts.success_callback(data, xh$
            },
            401: function(xhr) {
                    msgprint(__("You have been logged out"));
                    frappe.app.logout();
            },
            404: function(xhr) {
                    msgprint(__("Not found"));
            },

but not sure why. What could be different between admin and a user here? It doesn’t happen in other m/c either!!

Hi. It is not there.

There only reports what java return as not find with error code 404. Perhaps the problem is permissions will check!.

I will see now if find the error, then i get back to you.

Hi.

I check everything and i do not get any error. I also created a new user and everything is ok.

So, i need more info…

Thanks.

Did you solved your problem already?

No, am not sure how to go abt it. need to check in a different setup and see. is your frappe latest?

Yes. Are you calling the Report from within doctype and from a button?

Also, check if your user has permission for print Jasper reports. When you login with another user did you see the Jasper module like when you login as admin? And did you see the Report configurations with that user?

Yes, the report is generated from button click within a doctype.

As a user, I see the Jasper module -> Jasper Report -> List of my reports. The permissions in the individual reports(COA, Labels) look like this

I have set permissions to print in Jasper Report doctype for this role. It still doesn’t list here. Admin however still works without problems!

Well, seems that everything is ok there. I also check again and with me everything is ok.

Try to create another user and give them Jasper Reports permission put him with the same role has Jasper Reports permission.