Jump to content
Changes to the Jaspersoft community edition download ×

Crosstab and data source

Recommended Posts

By: robertsiqueira - robertsiqueira

Crosstab and data source

2006-05-30 04:34

I'm trying using crosstab + JRDatasource.. But Iam having problem's with this... I'am making a collection with my beans.. but when I export to PDF, it doesn't show the first element of my collection.. If I put "null" like the first element of the arrayList so, all elements are show in the PDF


Somebody have any solution ?!?!



Thank's a lot...

Link to comment
Share on other sites

  • 2 months later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic



I think you are passing the REPORT_DATA_SOURCE as the data source for the crosstab too, which of course its wrong because the report itself starts to iterate through it and consumes the first line before passing it to the crosstab.

You should reconsider your report design and make sure the report has its own data source to iterate through and does not interfere with what you want to pass as data source to your crosstab.


I hope this helps.


Link to comment
Share on other sites

  • 1 month later...

i m trying too to use crosstab with data source but I ve message like this :


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:621)

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

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

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

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

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

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

at jasper.JasperTableauCroise.testPDF(JasperTableauCroise.java:99)

at jasper.JasperTableauCroise.testJRBeanCollectionDataSource(JasperTableauCroise.java:78)

at jasper.JasperTableauCroise.main(JasperTableauCroise.java:54)

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)

... 12 more

Link to comment
Share on other sites

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