Jump to content

Dynamic data as parameters


Recommended Posts

By: Ashish - ashisharte

Dynamic data as parameters

2003-07-23 09:47

Hello,

 

I am trying to pass rows generated by a Java program as parameters to the report. For instance, one of my reports generates has three columns, client order, date and amount ( similar to one of the sample reports ) and at runtime I populate these columns with numerous rows depending upon certain constraits. The Java program currently generates these rows, so I was wondering if I can directly passes these rows to the report.

 

I understand that in one of the examples the parameters are stored in a Map. The reason why I am not embedding a sql directly within the report is, I am migrating from an old framework to Jasper and it would be easier if I just pass the data than to re-write all sqls again.

 

Thank you all in advance.

 

-Ashish

 

 

 

 

By: Ryan Johnson - delscovich

RE: Dynamic data as parameters

2003-07-23 18:36

If you don't want to use JRResultSetDataSource (which is the default when you embed sql in the template), just define your own. In my reporting work, I always use a custom datasource that reads from an ArrayList containing the rows stored as Object[].

 

Ryan

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...