Jump to content

is it possible to create Jasper Subreport using JSON file only


DDeshmukh

Recommended Posts

i want to create subreport inside main report i have external json file
structure should be like this 
studentName:  jonny
+---------------------------------------------------+
|        subreport  : marks                                  |
|        subject: english                                       |
|        score: 80                                                     |
+---------------------------------------------------+

studentName:  john
+---------------------------------------------------+
|        subreport  : marks                                  |
|        subject: english                                       |
|        score: 80                                                     |
+---------------------------------------------------+

and json data is 
how to achive this into jasper studio using json data file only

{
  "students": [
    {
      "studentName": "John Doe",
      "address": "123 Main Street, Springfield, IL",
      "email": "johndoe@example.com",
      "contact": "+1-555-1234",
      "branch": "Science",
      "marks": [
        { "subject": "english", "score": 90 },
        { "subject": "science", "score": 20 },
        { "subject": "maths", "score": 30 }
      ]
    },
    {
      "studentName": "Jane Smith",
      "address": "456 Elm Street, Springfield, IL",
      "email": "janesmith@example.com",
      "contact": "+1-555-5678",
      "branch": "Arts",
      "marks": [
        { "subject": "english", "score": 90 },
        { "subject": "science", "score": 20 },
        { "subject": "maths", "score": 30 }
      ]
    }
  ]
}
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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