Your question is a good one. I will assume that you are asking how to take a total from the sub-report and use that total in the main report. I will also assume that it is a linked report and that using the built in linking parameters and other selection criteria you have added, that the sub-report has just the records you need. I will assume that you are creating grand totals in the sub-report.
1) Create a formula in the sub-report with the following expression:
whileprintingrecords;
shared numbervar sub1 := sum({table.field});
sub1
2) place this in the group footer of the sub-report.
3) Return to the main report and place the sub-report above the point that you need the value. For example, if you need the value in the group footer of the main report, place the sub-report in the group header, or in a sub-section above the section where you need it.
4) in the main report create a formula with the following expression:
whileprintingdata;
shared numbervar sub1;
sub1
or you can just use the same expression as part of the formula you need.
I hope this helps. Howard Hammerman,
Crystal Reports training, consulting, books, training material,support. HammerLauch program runs reports without Crystal
howard@hammerman.com
800-783-2269