gmohdez Posted August 5, 2010 Share Posted August 5, 2010 Hi, I have a pretty weird situation:I've created my subreport which uses a variable to asign values depends on certain results of the query. At this point all works fine, but when I try to bind my main report's variable with this subreport's variable in the return values dialog, the last ones does not appear in the list "subreport variable"! Just appear the default variables from the subreport.Some specs:Subreport variablename=VFACTURADOclass=java.lang.Stringcalculation=nothingreset type=nonevariable expression=($F{NFACTURAS}.intValue()> 0 ? "S" : "N")initial value expression="N"Main report variablename=VFACTURADO (the same from subreport)class=java.lang.String (the same from subreport)calculation=nothing (the same...)reset type=none (the same...)variable expression (empty)initial value expression (empty)Subreport works fine, I've put it in the main report and show results (into the subreport) when run in JasperReports Viewer, but I can return it's variable to my main report.I've followed up the very step by step instructions to return values from subreports explained in iReport3.7 book, but nothing.I've tried to change reset type in both variables, making "test & fail" and no matter what, the name of the variable doesn't appear in the list.I've even tried to type manually the variable's name, but doesn't work, just print "null", obviously because this variable name doesn't recognized by the main report.I hope this info will be enough and anyone could reply to my ask. It's very urgent to me.I'm starting to think that is a BUG!!!Any suggestion? I'm using latest iReports version (3.7)Thanks in advancePost Edited by gmohdez at 08/05/2010 18:11 Link to comment Share on other sites More sharing options...
wudgaby Posted September 19, 2010 Share Posted September 19, 2010 I also had the same problem.pls help us. Link to comment Share on other sites More sharing options...
wudgaby Posted September 19, 2010 Share Posted September 19, 2010 that is BUG.manually typed your variable. Link to comment Share on other sites More sharing options...
explorer Posted September 20, 2010 Share Posted September 20, 2010 I assume that you are using the iReport designer.The iReport doesn't catch the variables defined in a sub-reports. So, these variable names have to be manually typed in the master report in the returned values dialog.I also tried returning values from the sub-report to the main report, but it was always showing the value to be null even when the evaluation time of the text field was set to "Report". It appears certainly a bug to me. Link to comment Share on other sites More sharing options...
darkmanta Posted December 24, 2010 Share Posted December 24, 2010 In the main report the calculation type of the receiving variable must be set to 'system'.I have a different problem: the main report variable content is not the value assumed in the currently calculated subreport but the value assumed in the precedent calculation.So if the subreport variable assumes the values:1, 2, 3...in the main report I havenull, 1, 2...Can't understand why... 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