help, data horizontal in the report

hi, i have this data :       data  =  [{"car":"clear","number":["12","13","14","21"]},{"car":"noClear","number":["34"]}]

i want to show like that in the report:

                                                                                clear

                                                                                12 13 14 21
                                                                                

                                                                                noClear

                                                                                34

 

Any idea people?, thanks.

                                                                              

jesus_jfri's picture
Joined: Oct 7 2015 - 2:59pm
Last seen: 6 years 8 months ago

2 Answers:

Just set up your report to use JSON as a datasource.

http://jasperreports.sourceforge.net/sample.reference/jsondatasource/

hozawa's picture
176421
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 11 months ago

Create a standardized two-dimentional table by converting the number sequences to space-delimited strings; use Jasper to build the simple desired list based on it. 

You can use esProc to prepare the data. The code is very simple:

=file("D:\\data.jason").read().import@j().new(car,number.string(" "):col)

The way Jasper accesses the esProc code is similar to the way it calls the database. You can learn more at http://blog.raqsoft.com/?p=4679 and http://blog.raqsoft.com/?p=4744 .

calculate.machine's picture
Joined: Jan 13 2015 - 11:40pm
Last seen: 7 years 5 months ago
Feedback