Search code examples
crystal-reports

Use value from subreport in whole group tree


I would like to use the SUMFIELD (Summarized Field) from the SUBREPORT#1 and add it to the SUMFIELD of GROUP#1 and GROUP#2. Is there a way to do this with the following report structure?

-------------------------------------------------------------------------------------------|
REPORT HEADER   |                                                                          |
-------------------------------------------------------------------------------------------|
PAGE HEADER     |                                                                          |
-------------------------------------------------------------------------------------------|
GROUP HEADER #1 | Group#1 Name                                    SUMFIELD of GROUP#1      |
-------------------------------------------------------------------------------------------|
                | Group#2 Name                                    SUMFIELD of GROUP#2      |
GROUP HEADER #2 |__________________________________________________________________________|
                | SUBREPORT#1                                 SUMFIELD OF SUBREPORT#1      |
                |__________________________________________________________________________|
-------------------------------------------------------------------------------------------|
PAGE FOOTER                                                                                |
-------------------------------------------------------------------------------------------|

Solution

  • Values passed from subreport to main report are not available in report sections before the one where the subreport is placed.

    But you could consider to import the same subreport a second time, to e.g. report header (making the subreport small enough is the easiest way to "hide" its content there).