Hello community,
i can't get the content of a collection of beans into a table :(
here is my bean:
So now you're in my universe, can someone explain why:
- The data adapter receives an incorrect amount of beans (3x)
- The table does not show data when the report is generated
- The report is waaay too long
Thank you,
best regards
JRS
2 Answers:
Hi,
The other problem which I can see is here is that ,the beans you have created should be at last should be storred in a collection/Array which should be fetched via report.
In the case of collection/ Array of beans, it could be looped in the Detail band and that will produce correct results. So Refer to the above links I have posted there are code snippets too . Go through them that will help you get the concept.
Hope that this helps.
Thanks
Ankur Gupta
http://ankurthetechie.blogspot.in/
Hi ,
I have a video made on the same subject have a look
http://www.youtube.com/watch?v=aCBRMm5_vbQ
You can also go through a artilcle for the same
http://ankurthetechie.blogspot.in/2013/12/jrdatasource-as-datasource.html
Do let me know if you need further help
Thanks
Ankur Gupta
http://ankurthetechie.blogspot.in/
Thank you for your help :)
I don't understand why I would need to create a custom Datasource when there is a JRBeanCollectionDatasource already implemented.
The table is located in the detail band...
Do I have to recode the Datasource anyway ?
How do I make the report fetch my collection ?
From what I read in your articles (very interesting by the way), it shouldn't take long nor be complicated, but still I puzzles me that there is no easier way.
As well, what package is JRDataSourceProvider in ?
Last note, I use JasperSoft Studio (not iReport, should I use iReport?).
Your help is highly appreciated.
I just succeeded in accessing my beans, by using the simple variable (drag & dropped in the details section, created a Label) but I can't get those in a table (as one per line).
Something must be missing in the table config.