Jul 23, 2003 #1 pleashelp Technical User Feb 27, 2002 97 US Using CR 8.5 I have a total formula in each of 2 sub-reports. Now I need to add those two sub-report totals in the main report. How do I do this?
Using CR 8.5 I have a total formula in each of 2 sub-reports. Now I need to add those two sub-report totals in the main report. How do I do this?
Jul 23, 2003 #2 synapsevampire Programmer Mar 23, 2002 20,180 US You'll want to create formulas in each subreport which pass the values to the main report. This is done using shared variables, as in: whileprintingrecords; shared numbervar Sub1Sum := sum({table.value}); Do this for both subreports using different names for the variables In the main you can use it as in: whileprintingrecords; shared numbervar Sub1Sum; shared numbervar Sub2Sum; subsum1+subsum2 Keep in mind that you have to reference the subrepoort value in a section after the subreport has run. -k Upvote 0 Downvote
You'll want to create formulas in each subreport which pass the values to the main report. This is done using shared variables, as in: whileprintingrecords; shared numbervar Sub1Sum := sum({table.value}); Do this for both subreports using different names for the variables In the main you can use it as in: whileprintingrecords; shared numbervar Sub1Sum; shared numbervar Sub2Sum; subsum1+subsum2 Keep in mind that you have to reference the subrepoort value in a section after the subreport has run. -k
Jul 23, 2003 Thread starter #3 pleashelp Technical User Feb 27, 2002 97 US Thanks...that's exactly what I needed! Upvote 0 Downvote
Aug 4, 2003 #4 tedi1 Technical User Aug 25, 2002 87 IL Hi k Is there a way to determine that the formula in the main report will run only after the rest of the report had run already? Upvote 0 Downvote
Hi k Is there a way to determine that the formula in the main report will run only after the rest of the report had run already?