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.
2 Answers:
Just set up your report to use JSON as a datasource.
http://jasperreports.sourceforge.net/sample.reference/jsondatasource/
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 .