Jump to content
We've recently updated our Privacy Statement, available here ×

multivalue parameter


Recommended Posts

By: Betuca Buril - betuca

multivalue parameter

2003-03-13 13:22

Hello people!

 

I was trying to use Jasper with Ireport and i´ve got some questions.

When i use a database connection with a SQL select it works realy fine. I

used a field on the IReport toll ($F{field_name}). In another java

class i needed to use a list of parameters, but i cant make it work. Does

anyone knows how can i put on the report an Array( collection, list,

...) on a parameter?

 

Thanks for your help

 

 

 

 

By: Teodor Danciu - teodord

RE: multivalue parameter

2003-03-13 13:40

 

Hi,

 

This smells like subreports combined with

JRBeanCollectionDataSource.

You can pass your collection as a parameter,

but you need a subreport to iterate on it and

generate some output in the master document.

 

Check the "subreport" and the "datasource"

samples.

 

I hope this helps.

Teodor

 

 

 

 

 

By: Enrico Goosen - enricogoosen

RE: multivalue parameter

2003-03-13 22:59

Further to what Teodor wrote...

Remember to set the parameter class to "java.lang.Object". Then cast it

to the appropriate Type.

In my report I pass a HashMap as a parameter.

I've got a scriptlet that uses the HashMap to display totals in the

Summary section of the report.

This might be useful in your case...if so, check out the scriptlet

example, in the samples section.

 

Regards,

Enrico

 

 

 

 

By: Betuca Buril - betuca

RE: multivalue parameter

2003-03-17 12:19

Thank you guys! After your help a I made it work!

 

thanks again!

 

Betuca.

 

 

 

 

By: Jonathan - jtoczek

RE: multivalue parameter

2004-04-22 07:03

I have the same problem...how you solve?

 

thanks

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...