views:

1091

answers:

1

I wrote a JRDataSourceProvider and a JRDataSource in order to access a "crippled" JDBC resource from iReport (it's an HP3000 database and the JDBC driver I am using does not support parameters in PreparedStatements, which iReport's standard JDBC datasource seems to require).

My JRDataSource needs to access report parameters. How do I do that?

A: 

You can write some java code to load a JRDataSource manually if you can't get something working in the report itself.

This is how we create reports where I am since we have to process data so much to generate the report.

Basically you create a List of Maps and load that up manually.

List<Map<Object, Object>> lisOfMaps = new ArrayList<Map<Object, Object>>();
...do data load...
JRRewindableDataSource ds = new JRMappCollecitoDataSource(listOfMaps);

I know its not exactly what you want, but it is away around the issue.

Arthur Thomas