llaconde Posted February 13, 2008 Share Posted February 13, 2008 Hello i'm using a subreport in my main report and I get back a sum from this subreport. It is called Somme_Surface_Parcours_2. I have to add this variable to another variable: Somme_Surface_Parcours_1. I need to put this addition in another variable: Somme_Surface_Parcours in which i put this : "( ($V{Somme_Surface_Parcours_2}==null) ? $V{Somme_Surface_Parcours_1} : $V{Somme_Surface_Parcours_1}.add($V{Somme_Surface_Parcours_2}) )" If I try to display this variable, i only get the Somme_Surface_Parcours_1 but if I display directly in a field my expression, it works just fine.So I really don't understand why something that is working in a field doesn't work in a variable.Please, help me, I going crazy!!!:woohoo: Link to comment Share on other sites More sharing options...
llaconde Posted February 13, 2008 Author Share Posted February 13, 2008 I forgot to tell that I'm forced to use a variable because I have to use it in a group after..:pinch: Link to comment Share on other sites More sharing options...
Pedja Posted February 13, 2008 Share Posted February 13, 2008 Try setting the Calculation Type for the variable to "System" and see if that helps. Link to comment Share on other sites More sharing options...
llaconde Posted February 14, 2008 Author Share Posted February 14, 2008 I tried but i get "null" as result. Do you anybody have an idea? Thank you for your help. Link to comment Share on other sites More sharing options...
llaconde Posted February 15, 2008 Author Share Posted February 15, 2008 I still haven't found the solution.Ideas? Thx. Link to comment Share on other sites More sharing options...
neon Posted February 19, 2008 Share Posted February 19, 2008 llaconde wrote:I still haven't found the solution.Ideas?Thx. I have same problem and I resolved problem with directly sum variable in text field (not use variable in master report). By my opinion maser variable calculate before get variable from subreport and because you have always only one variable added in master report sum variable. Link to comment Share on other sites More sharing options...
bnye Posted September 10, 2009 Share Posted September 10, 2009 This is really unfortunate because in many cases you are going to want to use a variable to sum the addition of two subreport variables in the master report. Using the text box technique you can get show the value of the subreport band but you can't perform any summary operations.Thanks,bnye Link to comment Share on other sites More sharing options...
bnye Posted September 10, 2009 Share Posted September 10, 2009 I should note the scenario would be like thisMasterRep1Var1 =SubRep1Var1MasterRep1Var2 =SubRep2Var1 The following can be done using a text boxMasterRepTextField1 = MasterRep1Var1 - MasterRep1Var2 However if you then wanted to sum all of the differenences up for the master report you would not be able to.MasterRepSum(MasterRep1Var1 - MasterRep1Var2) Sincerely,bnyePost Edited by bnye at 09/10/2009 15:57 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