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

Source variable ... not found for return value ...


buzz-dee

Recommended Posts

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

  • 1 month later...
  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

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

  • 3 months later...
  • 1 year later...

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

  • 1 year later...

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

  • 1 year later...
  • 2 years 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...