Jump to content
Changes to the Jaspersoft community edition download ×

array String in parameter


sito

Recommended Posts

Hello!

 

I pass to my report a parameter "report" with this structure :

 

parameters.put("Data", report );

 

report-> string[] countries;

List<subBean> offices;

 

I want show all the countries in my report

 

I have a parameter Data, and $P{Data}.getCountries() give me a string[].

 

How show all the countries in the same fiel???

 

I had tried this in one field:

 

Code:
String[] a = $P{Data}.getProvinces();
String result = "";
if (a.length > 0) {
result = a[0];
for (int i=1; i<a.length; i++) {
result = result + ", " + a;
}
}
return result;

 

But I was unlucky. :(

 

 

 

p.D.sorry for my English.

 

 

************************************

Ok now.

 

My problem was I wanted put the code into ireport, and it´s not possible (for me)

 

I write this code into of de class bean "report" (method CountriesToString()) and in the ireport i write -> $P{Data}.CountriesToString()

Post edited by: sito, at: 2007/01/25 17:20

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