buzz-dee Posted October 23, 2014 Share Posted October 23, 2014 I have a subreport with a variable $V{euroAllCommission} (Calculation: None, Increment type: None, Reset type: None) with the following expression: $V{euroOriginCommission} != null && $V{euroCommission} != null ? $V{euroOriginCommission} + $V{euroCommission} : $V{euroOriginCommission} != null ? $V{euroOriginCommission} : $V{euroCommission} != null ? $V{euroCommission} : null The subreport is set to return the variable "euroAllCommission" to the main report variable "euroFollowOnCommission" (Calculation: None, Increment type: None, Reset type: Report) with "Calculation type: Nothing". The subreport complies fine. but if I want to compile the main report with the containing subreport I get the following error.: net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Source variable euroAllCommission not found for return value euroFollowOnCommission. at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:467) at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$18(ReportControler.java:442) at com.jaspersoft.studio.editor.preview.view.control.ReportControler$4.run(ReportControler.java:334) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: net.sf.jasperreports.engine.JRException: Source variable euroAllCommission not found for return value euroFollowOnCommission. at net.sf.jasperreports.engine.fill.FillReturnValues.checkReturnValues(FillReturnValues.java:281) at net.sf.jasperreports.engine.fill.JRFillSubreport.validateReport(JRFillSubreport.java:952) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:421) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:307) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:259) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:456) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2067) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:788) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:298) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:152) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:963) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFiller.run(BaseFillHandle.java:120) at java.lang.Thread.run(Unknown Source) How can I get the subreport return value to the main report? Link to comment Share on other sites More sharing options...
arron.moss Posted December 4, 2014 Share Posted December 4, 2014 Hi,I have exactly the same issue, I've followed all forum posts to the letter and it doesnt work in Studio v 6+. I am literally testing all options within the 2 variables from report to sub-report but always get the same issue. net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Source variable TimeLogged not found for return value TimeLogged. Link to comment Share on other sites More sharing options...
bartv2000 Posted March 19, 2015 Share Posted March 19, 2015 Hi,Any news on this? I have the same problem.Thx Link to comment Share on other sites More sharing options...
dprogrammer Posted April 26, 2016 Share Posted April 26, 2016 I had the same issue in Jasper Studio 6 but I got it resolved. Once you add the sub-report variable (source) in your sub-report, make sure to compile the file or better yet compile and then close the report and exit JS IDE. Do the same thing with main report after you have joined the target variable to that source variable. After you re-launch JS IDE the error should go away. Link to comment Share on other sites More sharing options...
dstevens_2 Posted August 21, 2017 Share Posted August 21, 2017 Doesn't look like there are too many answers to be had for this problem, but i am encountering a similar issue for which closing ide did not work.Thx in advance net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Variable WellID_Return is not assignable from source variable WellID. at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:537) at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:512) at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:393) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)Caused by: net.sf.jasperreports.engine.JRException: Variable WellID_Return is not assignable from source variable WellID. at net.sf.jasperreports.engine.fill.AbstractVariableReturnValueSourceContext.check(AbstractVariableReturnValueSourceContext.java:77) at net.sf.jasperreports.engine.fill.FillReturnValues.checkReturnValues(FillReturnValues.java:233) at net.sf.jasperreports.engine.fill.JRFillSubreport.validateReport(JRFillSubreport.java:1043) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:466) at net.sf.jasperreports.components.table.fill.FillTableSubreport.evaluateSubreport(FillTableSubreport.java:102) 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:381) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:500) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2022) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:748) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:115) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:580) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:123) at java.lang.Thread.run(Thread.java:745) Link to comment Share on other sites More sharing options...
michael.moore_2 Posted August 27, 2018 Share Posted August 27, 2018 I resolved this issue with Jaspersoft Studio 6.5.1 by recompiling the main report template after defining the variables in the sub-report.Right-click on the main report template file (*.jrxml) in Project Explorer and select "Compile Report". Link to comment Share on other sites More sharing options...
cristian.dragomir Posted October 2, 2020 Share Posted October 2, 2020 I've solved this problem by makeing bots variable same type. In my case, i was trying to put Long in String variable. After i had made both variables Long type, no more error. Hope this will help someone. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now