Oct 31, 2004 #1 ruan123 Programmer Jul 23, 2004 23 ZA Hi, is there a way to pass the grand total sum of a subreport to the main report as a variable. I am using Crystal 10. Thank you
Hi, is there a way to pass the grand total sum of a subreport to the main report as a variable. I am using Crystal 10. Thank you
Oct 31, 2004 1 #2 lbass Technical User Feb 9, 2002 32,816 US You would create a shared variable within the subreport like: whileprintingrecords; shared numbervar grtot := sum({table.amt}); You must place this formula somewhere on the subreport canvas, so you could use it instead of the grand total on the subreport. Then in the main report, you can reference it for further calculations, as in: whileprintingrecords; shared numbervar grtot; grtot * {table.price} Any formula in the main report which uses the shared variable must be in a section below the one in which the subreport is located. -LB Upvote 0 Downvote
You would create a shared variable within the subreport like: whileprintingrecords; shared numbervar grtot := sum({table.amt}); You must place this formula somewhere on the subreport canvas, so you could use it instead of the grand total on the subreport. Then in the main report, you can reference it for further calculations, as in: whileprintingrecords; shared numbervar grtot; grtot * {table.price} Any formula in the main report which uses the shared variable must be in a section below the one in which the subreport is located. -LB