Hi,
it is basically up to you how you transfer the data for report generation. You can either send the whole data as an ajax request from the client (as it is done for report preview) or you can fetch the data on the server as you can see in the demo application:
I'd recommend the latter because the data is usually on the server anyway and you avoid sending large requests. You just need to send minimal data (like year parameter in the demo app, or some id etc.) and then query the data in your controller function and pass it to report generation.
Alex