Jump to content

Recommended Posts

Posted

For our Project we are developing a web app consisting of a TypeScript Frontend and Java Backend. In this app, the user has the option to request a report. The report is generated by Jasper Server v7. To get access to the required data, we have added a JSON-DataSource to the Jasper Server, which uses the REST-API of our Java Backend. When we call the Jasper Server, we use a few request parameters, which in turn are also used for the JSON-DataSource.
To create the DataSource, we have to use default-parameters for the request parameters. If we just keep the fields empty, it just throws an error and doesn't let us continue. 

Our problem is, whenever we request a report now, our backend is called two times, first with the default parameters we used when we set up the report, an then with the parameters we send to request the report. Is there any way to prevent the first "default" call? Everything is functioning correctly, but the unnecessary  request just creates more load on our server, which we want to reduce. 

Our JasperSoft Studio Version is 6.12.2 (we use this version on purpose, since the newer versions lead to other problems). 

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted


Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.

Posted

Hi jaspersoft_313, could you please provide more info on the error that you encounter when you create your JSON datasource with the default params ? You should be able to create your DS without any default params. 

Please share the error logs and the screen shots of how you're setting your DS. 

Thanks

Posted

Hi bdraifi,

you're right, the json datasource doesn't require default params, I misremembered. But even if I don't use default params, our backend still gets two requests from the jasper server, first an "empty" request and then the request with the correct url-parameters, so the problem stays the same

Posted

Hello, we had to found a workaround for that.

We added a parameter called "ping" with true as default value

The defaut values are used in that stange first call.

In the backend, if "ping"is true, we return a success and no value

Then, we call the data forcing "ping"to false to get the real value

This is very strange, it seems this first call is a "hey, do you live ?" called with /inputcontrol url

I hope it will hepl

 

 

 

Posted

Hello, we got the same problem 3 or 4 years ago and we had to found a workaround for that.

We added a parameter called "ping" with "true" as default value

It seems the defaut values of the parameters are used in that stange first call.

In the backend, if "ping"is "true", we return a success and no value.

Then, we call the data forcing "ping" to false to get the real values

This is very strange, it seems this first call is a "hey, do you live ?" called via the /inputcontrol url. That's why we called that dummy parameter "ping"

I hope it will help

 

Dany

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...