We are trying to access the JasperSoft reports using Visualize.js api`s and are able to successfully fetch the InputControls , Sample Dashboards, but getting resource not found exception only on report execution method . Do we need any permissionMask for report execution or there are some restrictions over execution .
Resource : /organizations/organization_1/reports/Dsh_Outbound_Online_Hourly_Avg_Talktime
Also tried with Sample reports and response is still resource not found .
Resource : /public/Samples/Reports/01._Geographic_Results_by_Segment_Report
Exception : Response :
- {message: "Resource 8bc23408-f2af-4374-9345-d52eb7e13abe not found.", errorCode: "resource.not.found",…}
- errorCode: "resource.not.found"
- message: "Resource 8bc23408-f2af-4374-9345-d52eb7e13abe not found."
- parameters: ["8bc23408-f2af-4374-9345-d52eb7e13abe"]
- 0: "8bc23408-f2af-4374-9345-d52eb7e13abe"
Implementation :visualize(
{
auth: {
token: ********,
preAuth: true,
tokenName: "pp",
}},
function (v) {
v("#dashboard").report({
resource: "/public/Samples/Reports/01._Geographic_Results_by_Segment_Report",
error: function(e) {
console.log(e);
}
});});
- 0: "8bc23408-f2af-4374-9345-d52eb7e13abe"
1 Answer:
Things to check:
1. The first resource path refers to an Organization and I don't see Organization specified in your visualize.js call.
2. If you log in using the same user(pp) on Jaspersoft and run the same report do you see the same error? It could very well be permissions on the resources for that user.