Print Page | Close Window

Subreport page footer

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=15206
Printed Date: 20 Apr 2025 at 6:47am


Topic: Subreport page footer
Posted By: Fern82
Subject: Subreport page footer
Date Posted: 21 Dec 2011 at 12:59am
Hi all,
 
I have in the same Main report 3 subreports, each subreport have several lines, I want to print on Main report the subtotal of the actual lines.
Actually I get the total of the subreport when the subreport has finish printing lines.
Can anybody help me?
Thanks.



Replies:
Posted By: lockwelle
Date Posted: 23 Dec 2011 at 7:04am
you can put a shared variable in each of the subreports, so:
shared numbervar subreport1 := 0;
shared numbervar subreport2 := 0;
shared numbervar subreport3 := 0;
 
do this before you call the subreports.
in the subreport update the shared variable to the correct number.
 
shared numbervar subreport1;
shared numbervar subreport2;
shared numbervar subreport3;
subreport1 + subreport2 + subreport3
 
HTH
After the subreports have run, you can do this:
 



Print Page | Close Window