Jump to content
Changes to the Jaspersoft community edition download ×

Issue with report with no inputs


srang

Recommended Posts

I'm using visualize.js to create a form dynamically based on what report a user selects and then what inputs that report has. However when the user selects a report that doesn't have inputs and visualize tries to look up what inputs the report has, visualize throws and error that it was "Unable to parse response from server". Is that the designed behavior? If so is there a way I can handle that error separately from other errors?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Upon closer inspection this error doesn't seem to actually go back to the specified error handler. Here is my code (I have already run visualize.config) uri is the uri returned by resources search and I checked that it is valid:

visualize(function(v) {  var ic = v.inputControls({        resource: uri,        success: function(data) {          console.log(data);        },        error: function(err) {          console.log("Visualize.js error in InputControl retrieval");          console.log(err);        }  });});[/code]

When this runs on a report with inputs, the console logs the Array [ Object ], but when run on a report without inputs it only logs a JS error: "Error: Unable to parse response from server." However, other errors such as an authenticationError, still go through the error function properly.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...