Jump to content
  • JSON Data adapter query issue

    Assigned User narcism
    CategoryBug report

    Hi Teodor,


    When using the Json Data Adapter, the data query syntax doens't seem to work for accessing header fields in a json data set. Or I'm missing something in the query syntax.


    You will see in the example report attached that all header fields are null when previewing the report in Studio. The fields in the detail band however are working fine.


    When I add header fields in the Studio using the 'add node as field', they are added with the syntax header.customer.id but this doesn't work. I also tried using JSONPath syntax (to access header fields you need to use the syntax $.header.customer.id) but this doesn't work, JSONPath (http://goessner.net/articles/JsonPath/) doesn't seem to be implemented in JsonDataSource.


    If this issue could be solved, this would allow JasperReports to be used for Node.js applications written in JavaScript. I think it will be even possible to incorporate the JasperReports reporting engine as a Node.js module using a Java bridge I came across last week (https://github.com/cesarvr/Ella). As enterprise adoption for Node.js (applications) is growing very rapidly, it would be a great opportunity I think!


    Thanks and kind regards,



    Attachments: test.json

    User Feedback

    Recommended Comments

    Changed Resolution from Open to Fixed

    Changed Status from New to Resolved

    In JasperReports Library v6.3.1 we have introduced a new JSON query language (JSONQL) to address the limitations of the existing JSON language. The one you have mentioned is included as well.More info about the language syntax can be found here: http://jasperreports.sourceforge.net/sample.reference/jsonqldatasource/index.html#jsonqlPlease note that neither of the newer JSONQL or the previous JSON language is JSONPath-based, despite some similarities in the newer JSONQL.
    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...