help, data horizontal in the report

0

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: 3 years 2 months ago

2 Answers:

0

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

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

hozawa's picture
53152
Joined: Apr 24 2010 - 4:31pm
Last seen: 5 months 1 week ago
0

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: 3 years 11 months ago
Feedback
randomness