Jump to content

Filling crosstab with JRBeanCollectionDataSource


zbd

Recommended Posts

Hi, guys. I'm trying to fill crosstab with JRBeanCollectionDataSource, but I have some problems.

 

So, i have a simple crosstab created with iReport:

 

-----------------------------------------------------------

|---------------------|-$V{rowHeader}-|---------------|

-----------------------------------------------------------

|--$V{colHeader}--|--$V{crValue}----|-----------------|

-----------------------------------------------------------

 

I'm trying to fill report passing the collection of beans. Bean has 3 fields: rowHeader, colHeader and crValue for each variable of crosstab. But during report filling I throws into exception:

 

Exception in thread "main" net.sf.jasperreports.engine.JRRuntimeException: Error incrementing crosstab dataset

at net.sf.jasperreports.engine.fill.JRFillCrosstab$JRFillCrosstabDataset.customIncrement(JRFillCrosstab.java:654)

at net.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:169)

at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:152)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:604)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:229)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:751)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:679)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)

at POCReport.main(POCReport.java:29)

Caused by: net.sf.jasperreports.engine.JRException: Crosstab data has already been processed.

at net.sf.jasperreports.crosstabs.fill.calculation.BucketingService.addData(BucketingService.java:286)

at net.sf.jasperreports.engine.fill.JRFillCrosstab$JRFillCrosstabDataset.customIncrement(JRFillCrosstab.java:650)

... 10 more

 

How should I properly fill crosstab using JRBeanCollectionDataSource?

 

P.S. Thanks for your help!

Post edited by: zbd, at: 2007/01/12 17:59

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Hmmm... Neither of two decisions helps me...

The crosstab doesn't fills or I have exceptions in different situations.

Guys, did anybody use JRBeanCollectionDataSource for crosstab filling? Please, help me with my simple crosstab!

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks 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...