Jump to content
Changes to the Jaspersoft community edition download ×

subdata set issue when sorting and filtering


martin_48

Recommended Posts

Hi

I've got a report using a table with a sub data set.

My simple test works, but when I move to something more complicated (main dataset sorted and filtered)  I get an error like this...

net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: ((net.sf.jasperreports.engine.data.JsonQLDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("attrs.*")    at com.jaspersoft.studio.editor.preview.view.control.ReportController.fillReport(ReportController.java:550)    at com.jaspersoft.studio.editor.preview.view.control.ReportController.access$18(ReportController.java:525)    at com.jaspersoft.studio.editor.preview.view.control.ReportController$1.run(ReportController.java:443)    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)Caused by: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: ((net.sf.jasperreports.engine.data.JsonQLDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("attrs.*")    at net.sf.jasperreports.engine.fill.JREvaluator.handleEvaluationException(JREvaluator.java:284)    at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:316)    at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:672)    at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:640)    at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:1169)    at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:522)    at net.sf.jasperreports.components.table.fill.FillTableSubreport.evaluateSubreport(FillTableSubreport.java:105)    at net.sf.jasperreports.components.table.fill.FillTable.evaluate(FillTable.java:133)    at net.sf.jasperreports.engine.fill.JRFillComponentElement.evaluate(JRFillComponentElement.java:110)    at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:383)    at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:548)    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2583)    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:813)    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:264)    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:110)    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:615)    at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:135)    at java.lang.Thread.run(Thread.java:748)Caused by: java.lang.ClassCastException: net.sf.jasperreports.engine.fill.SortedDataSource cannot be cast to net.sf.jasperreports.engine.data.JsonQLDataSource    at findingIdCounts_1568296982745_524343.evaluate(findingIdCounts_1568296982745_524343:220)    at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:302)    ... 16 more[/code]

So this looks pretty bad to me. Tables and sub datasets work when the main dataset isn't sorted, but when its sorted if throws up.

Is there a solution to this issue?  I guess sort and filter up stream of jaspersoft....

Thanks

Martin

Link to comment
Share on other sites

  • 3 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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