Displaying Subreport Totals Fields in Main Report 
Author Message
 Displaying Subreport Totals Fields in Main Report

Hi
I have a report which contains 3 subreports.  The main report contains
header information, and each of the three subreports contains financial
info.  Each Sub-report contains a Running Total.  Is it possible to display
the combined total of all these 'Running Totals' from each of the Subreports
and display it in the main report, perhaps in the footer section.

Any help would be much appreciated.

Kind Regards

Rikesh
(Using Win2K/VB6/SQL2K/CR8.5Dev.Ed/CRAX.DRT)



Wed, 22 Sep 2004 00:24:46 GMT  
 Displaying Subreport Totals Fields in Main Report
Hi Rikesh,
    You can get pull this information into your main report by inserting a
formula field into each of your subreports and, in the formula, equate the
running total field to a "Shared" variable:
    Shared numberVar total1 := {RunningTotalField}
Then in your main report, in a section that is processed after the
subreport, you can insert a formula that adds these totals:
    Shared numberVar total1;
    Shared numberVar total2;
    Shared numberVar total3;
    Shared numberVar grandtotal;
    grandtotal := total1 + total2 + total3

Bob Holmes


Quote:
> Hi
> I have a report which contains 3 subreports.  The main report contains
> header information, and each of the three subreports contains financial
> info.  Each Sub-report contains a Running Total.  Is it possible to
display
> the combined total of all these 'Running Totals' from each of the
Subreports
> and display it in the main report, perhaps in the footer section.

> Any help would be much appreciated.

> Kind Regards

> Rikesh
> (Using Win2K/VB6/SQL2K/CR8.5Dev.Ed/CRAX.DRT)



Wed, 22 Sep 2004 00:43:44 GMT  
 Displaying Subreport Totals Fields in Main Report
Thank you Bob, Works like a dream!!! Had some slight problems earlier, but
that was rectified when I changed the declaration from 'numberVar' to
'CurrencyVar', other than that, there were no problems.

Thanks again.

Kind Regards

Rikesh


Quote:
> Hi Rikesh,
>     You can get pull this information into your main report by inserting a
> formula field into each of your subreports and, in the formula, equate the
> running total field to a "Shared" variable:
>     Shared numberVar total1 := {RunningTotalField}
> Then in your main report, in a section that is processed after the
> subreport, you can insert a formula that adds these totals:
>     Shared numberVar total1;
>     Shared numberVar total2;
>     Shared numberVar total3;
>     Shared numberVar grandtotal;
>     grandtotal := total1 + total2 + total3

> Bob Holmes



> > Hi
> > I have a report which contains 3 subreports.  The main report contains
> > header information, and each of the three subreports contains financial
> > info.  Each Sub-report contains a Running Total.  Is it possible to
> display
> > the combined total of all these 'Running Totals' from each of the
> Subreports
> > and display it in the main report, perhaps in the footer section.

> > Any help would be much appreciated.

> > Kind Regards

> > Rikesh
> > (Using Win2K/VB6/SQL2K/CR8.5Dev.Ed/CRAX.DRT)



Fri, 24 Sep 2004 18:30:34 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. displaying field from subreport in main report?

2. filtering subreports based on main report fields

3. Accessing Subreport field from main report in Crystal

4. Make Link subreport with main report using fields (using API)

5. Pass value field subreport to main report

6. Referencing Fields in main report to subreport

7. Accessing fields in subreports from Main report

8. Using totals of sub-reports in main- report

9. Total Sub-reports in Main-report HOW?

10. main report with subreport in columns

11. Summaries of SubReports in the main report

12. Get subreport's summary from main report

 

 
Powered by phpBB® Forum Software