JulEgner Posted August 4, 2006 Share Posted August 4, 2006 I need to return a return Value from a Subreport to the main report, but it is always NULL. Can someone tell me how to transfer Data from a Subreport to the Main Report? Link to comment Share on other sites More sharing options...
lucianc Posted August 4, 2006 Share Posted August 4, 2006 If the subreport and the text field in which you're using the returned value are placed on the same band, you need to set evaluationTime="Band" for the text field. HTH,Lucian Link to comment Share on other sites More sharing options...
JulEgner Posted August 6, 2006 Author Share Posted August 6, 2006 Thanks.. I also want so have a sum of the return values of all subreports.. how can I do that? I know that it should be in the Summary area, but there must be more to do zo get it working. Link to comment Share on other sites More sharing options...
lucianc Posted August 7, 2006 Share Posted August 7, 2006 Check the subreport sample in the JR distribution (or online at http://www.jasperforge.org/images/documentation/jasperreports/samples/MasterReport.jrxml) to see some examples of returning values from subreports. If you want to sum the values returned from the subreport, all you need to do is to specify the calculation type:Code:<returnValue ... calculation="Sum"/> HTH,Lucian Link to comment Share on other sites More sharing options...
JulEgner Posted August 7, 2006 Author Share Posted August 7, 2006 Thanks a lot.. I solved this Problem by setting the calculation Type in Subreport(Others)/Subreport Return Value AND in the description of the Variable. But now I have another Problem.. I have a Subreport in the detail area. This Subreport gives a return Value to the Main Report. Now I want to give this Value to the Subreport in the next detail (of the next Dataset). I Want to give so data from a subreport to the main Report to the subreport. Link to comment Share on other sites More sharing options...
JulEgner Posted August 7, 2006 Author Share Posted August 7, 2006 I also want to use the return values of the subreport for a chart, but the chart does not display anything. I use the workaround for the 1.2.5.-Chart-Bug and if I set a fix Number, a chart is Displayed. Link to comment Share on other sites More sharing options...
JulEgner Posted August 8, 2006 Author Share Posted August 8, 2006 If you know a way to use a subreport return value for charts, please tell me.. Link to comment Share on other sites More sharing options...
javydreamercsw Posted August 23, 2006 Share Posted August 23, 2006 Looks like we are almost working in the same kind of projects and encounter the same type of problems. Anyway I've posted a question like yours and still no answer. I even created a bug about it and no news either. I'm working in a code workaround. I'll keep you posted. Link to comment Share on other sites More sharing options...
javydreamercsw Posted August 23, 2006 Share Posted August 23, 2006 Looks like we are almost working in the same kind of projects and encounter the same type of problems. Anyway I've posted a question like yours and still no answer. I even created a bug about it and no news either. I'm working in a code workaround. I'll keep you posted. Link to comment Share on other sites More sharing options...
JulEgner Posted August 24, 2006 Author Share Posted August 24, 2006 I switched my Database from Access to mySQL and the Chart (XY-Chart) works.. the Timechart not.Unfortunately I don't know WHY it works now, but at least we know that it is possible. Link to comment Share on other sites More sharing options...
javydreamercsw Posted August 24, 2006 Share Posted August 24, 2006 In my opinion it should be related to date format. MySQL date format is more standard between databases than Access. Maybe is somethi8ng related. Link to comment Share on other sites More sharing options...
jiechu Posted April 28, 2009 Share Posted April 28, 2009 Do you know how to transfer a value from subreport to main report? In main report, I define a variable subFee(BigDecimal) and in subreport, I define a variable fee(BigDecimal), the question is when I use <returnValue subreportVariable="fee" toVariable="subFee"/>, it always show null even if there is a valid value in subreport. How to resolve it? I test in both ireport 2.5 and ireport 3.5.Please let me have your feedback.Thanks a lot. Link to comment Share on other sites More sharing options...
jiechu Posted April 28, 2009 Share Posted April 28, 2009 jiechuWrote: Do you know how to transfer a value from subreport to main report? In main report, I define a variable subFee(BigDecimal) and in subreport, I define a variable fee(BigDecimal), the question is when I use <returnValue subreportVariable="fee" toVariable="subFee"/>, it always show null even if there is a valid value in subreport. How to resolve it? I test in both ireport 2.5 and ireport 3.5. Please let me have your feedback. Thanks a lot. I already use evaluated time "Band". Link to comment Share on other sites More sharing options...
chowyeen Posted May 3, 2010 Share Posted May 3, 2010 Hi there,I have linked a subreport to the main report and display the subreport value in the main report. However, I need to use the data from subreport to do calculation in main report. Can anyone advice me how do I go about it? Thank you. Link to comment Share on other sites More sharing options...
harlemarispe Posted October 31, 2012 Share Posted October 31, 2012 Yes this is what I was needing... thanks! small things make big differences :) Link to comment Share on other sites More sharing options...
maria10jose06 Posted June 12, 2013 Share Posted June 12, 2013 Thanks for the help! Link to comment Share on other sites More sharing options...
nominosai Posted July 3, 2013 Share Posted July 3, 2013 Hi All,I would like to ask all of you about the same thing but a little bit different.I have linked a subreport to the main report like the others do, and want to show it in detail band (main report), and like you said before, I have changed the evaluation time to "Band". But, when i try to preview, it turned out showing null. Later, I want to calculate this return value in main report and of course showed in detail band too. Can anyone advice me how i do this problem? I hope i could get the answer as soon as possible. Thank you a lot.Sorry if my english is a little bit off. Link to comment Share on other sites More sharing options...
pgopakumar42 Posted March 18, 2014 Share Posted March 18, 2014 hi, i need to get sum of a variable in sub report to main report how it possible?? 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