0

I already installed JasperReports Server 6.4.3 with Jaspersoft Studio 6.5.1 . I was able to create and generate report using JSON file input in Jaspersoft Studio. But I can't seem get it right when I tried to do it in collaboration with JasperReports Server.

I have prepared these things :

  1. Try JDBC data source and publish the related report to test if the report works , and it did.
  2. Upload the jrxml file to JasperReports Server
  3. Get the JSON dummy data in file and store in localhost

Initially , I was going to send and retrieve data via API. So, in my initial understanding , the flow is like :

Jaspersoft Studio -> JasperReports Server <-> API

The JDBC Data Source works well but I can't seem to get it right with JSON type , so I thought that the JSON flow should be the same with JDBC , I just have to adjust JSON Data Source's settings with JDBC Data Source's settings, since I have the file. But whenever I try to save a new JSON Data Source in JasperReports Server , it always requires Query field to be filled in (in my understanding, it shouldn't be any query since the file already contains final data). But when I put any wild character, it success on creating JSON Data Source but always failed to generate report. [Error text , like : Please contact Administrator]

Is there something that I miss or lack ?

Thanks

ADDITIONAL QUESTION : is it required to fill Query column when we want to add a new JSON Data Source ?

ADDITIONAL INFO : I was able to generate the report as I want it , by creating jrxml and data adapter file at Jaspersoft Studio , and then upload the data adapter and configure the jrxml so it will point the required data adapter. In my simple mind, this requires a data adapter for a jrxml file, that means if we have 1000 report design , we should prepare 1000 data adapter. I also concerned session's request or key to identify which request is appropriate for each report's result (I don't know if this is necessary). Is this the best idea ? or , is there any better idea ?

Ray
  • 31
  • 5
  • 1
    You should be able to do all you need from within Jaspersoft Studio. Although my answer [here](https://stackoverflow.com/questions/46468144/how-to-use-csv-as-datasource-in-jaspersoft-server/46584650#46584650) is about CSV, it should apply to the JSON case also. – Narcis Mar 28 '18 at 09:23
  • @Narcis thanks for the reply, and I tried that with JSON Data Adapter. It works, but we need to upload data adapter and related jrxml file to the JasperReports Server and make sure the related jrxml is pointing the required data adapter. Is this the best way to transfer the report via API ? Since there is a chance that multiple users that will use the same report at the same time. I'm thinking that, this is for cloud environment. – Ray Mar 29 '18 at 07:27
  • Data adapters can be reused, if necessary, and they are not the only way to provide data for your report. Check out [this post](https://stackoverflow.com/questions/37408863/location-data-for-filling-the-report-in-jasperserver) on ways to use external data. What do you mean by _"I also concerned session's request or key to identify which request is appropriate for each report's result"_ ?. What is your actual use case? – Narcis Mar 29 '18 at 11:24

0 Answers0