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

chrisrollins65

Members
  • Posts

    2
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by chrisrollins65

  1. Well if anyone runs into a similar situation, I've posted a solution at http://stackoverflow.com/a/31447848/1193304
  2. I'm new to Jaspersoft Studio, so I'd like to know if it's possible to do the following: The problemFor my report in Jaspersoft Studio, I'm passing in parameters from a java class, and one of the parameters is an ArrayList that contains information such as this: ArrayList<String> benefits = new ArrayList<String>();benefits.add("benefit_1");benefits.add("benefit_2");benefits.add("benefit_3");benefits.add("benefit_4"); In my report, I need to display the information like this: - Benefit: benefit_1 - Benefit: benefit_2 - Benefit: benefit_3 - Benefit: benefit_4This ArrayList has a variable amount of items, so sometimes there are 4, sometimes only 2, etc. How can I iterate through this list in the report and output it in this format? What I've triedFrom reading other similar questions here and on stackoverflow, I've tried adding a subreport with the ArrayList as the data source: <subreport> <reportElement ... /> <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{benefits})]]></dataSourceExpression> <subreportExpression><![CDATA["benefits.jasper"]]></subreportExpression></subreport>[/code]But in the subreport, how would I display the ArrayList elements? Or is it possible to do what I'm trying to do without the subreport?
×
×
  • Create New...