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

List Component


baggypants

Recommended Posts

  • Replies 11
  • Created
  • Last Reply

Top Posters In This Topic

Cool, thanks Baggypants!  Yeah, I love the new List component, it's almost a light subreport!

I used the List component in this video tutorial:
http://jasperforge.org/website/ireportwebsite/IR%20Website/tutorials/Dashboard/Dashboard.html

I added your article to the iReport wiki:
http://jasperforge.org/plugins/mwiki/index.php/Ireport

Thanks again, I hope other people like you will share some documentation in the future!

Giulio

Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...
  • 1 month later...

Hi,

 

I really like the list component, but I'm getting some trouble doing one thing:

 

For each record in my main datasource, I'll display a sub-listing, using the list component.

 

On the dataset1 (the one linked to the list component), I've set a variable $V{listTotal} that will SUM a specific dataset1 field, let's say $F{ammount} which is a BigDecimal. It is set to reset at Report level, so for each list iteration (once for each main datasource record) it will start with value 0.

 

Perfect!

 

Now I have a problem ... I need to SUM all those sub-totals, so I can display a TOTAL at the end of the report ... but I can't seem to create a text field that can link to those dataset1.listTotal values ... or better still, I can't find a way to pass the listTotal value to a global SUM variable, so I can display it at summary band, or something ...

 

Any way of doing it?

 

Thanks

Link to comment
Share on other sites

  • 2 months later...

Hi,

I am using the javabeans datasource to generate my report. It works fine until it encounters an arraylist. How can I display the items in this arraylist? It contains custom objects with custom properties. I wanted to use the List Component for this, but how do I use it?

Can you help?

Thanks in advance,

Regards,

Link to comment
Share on other sites

  • 4 weeks later...

Hi Giulio,

I tried to mimic your dashboard demo and got a problem with the list component. As soon as I set the dataset to allow more than 1 row, the parent frame height is pushed out by the (number of rows) * the list height.

Any idea what I could do wrong?

Thanks in advance.

Link to comment
Share on other sites

  • 3 months later...

 Hi ,

I'm getting this error from the List component

[ERROR]: Digester.error() Parse Error at line 607 column 47: cvc-complex-type.3.2.2: Attribute 'width' is not allowed to appear in element 'jr:listContents'.

org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'width' is not allowed to appear in element 'jr:listContents'.

at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)

at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)

at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)

at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)

at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:429)

at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3185)

at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processAttributes(XMLSchemaValidator.java:2680)

at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2094)

at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)

at org.apache.commons.digester.Digester.parse(Digester.java:1745)

at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:239)

at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226)

at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)

at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:168)

at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)

Link to comment
Share on other sites

  • 1 year later...

Hi,everybody,recently,I work on ireport.List component is a powerful component,but I don't know is my knowledge limited or ireport really exist restrictions.I use a list as dataset,It works.But now I have two list component,I want to put one to antother.For instance,I want to show case info,cover is relate to case info,if their type is the same,cover material will show under specific case info.DataSet1 has a field caseType and DataSet2 has a field coverType.If caseType!=coverType,no need show cover info under the specific case.Unlucky,I could not access caseType in DataSet2.I don't know whether I decribe clear,anybody know the solution,please tell me.

 

Thanks in advance.

Link to comment
Share on other sites

  • 1 year later...
  • 8 months later...

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