howto manually fill live data into a report adhoc / just-in-time


I just searched my ass of to find an answer to this question to no avail
albeit i think what i want is fairly trivial - i hope someone can help me.

I want to fill a Report with one dataset at a time, because the information
is generated just-in-time from a packaging machine. Time is critical,
so i have to adhoc fill my report with every single dataset just the moment 
i get the current dataset complete. Something like this:

    wait for the dataset to become complete
    fill the report with the one dataset
    print the report

The best way to do this that i know up to now is this:

    create a bean with a dataset
    create an array of this one dataset
    create an JRBeanArrayDataSource with the array
    fill the report with the datasource
    export or print the report

But i have the strong Feeling, that this is not the optimal solution, 
because i simply want to give the fields to the report directly
without using that Bean-Array for just one dataset.

Is there a more elegant way to do this?


ospf's picture
Joined: Jun 18 2013 - 12:23am
Last seen: 9 years 5 months ago

0 Answers:

No answers yet