Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Totaling subreport data on each page Post Reply Post New Topic
Author Message
lmeyermba
Newbie
Newbie
Avatar

Joined: 01 Aug 2008
Location: United States
Online Status: Offline
Posts: 2
Quote lmeyermba Replybullet Topic: Totaling subreport data on each page
     Posted: 16 Sep 2008 at 8:11am
I have 5 subreports linked to the main report all based on Employee ID.  They each pass their data via a shared variable.  The data is being passed to the main report without a problem.  When I try to total each page (one per employee), I am not getting the correct total when there is a blank value for one of the subreports.  If the value should be 0, the subreport is still holding the value from the previous employee, and adding that into the total - even though it is not displaying a total.
 
Is there a way to clear the shared variable for each page (employee).  I have tried putting a reset in the page footer, but it doesn't seem to work.  I have also tried putting a reset variable in the header of the subreport - that also didn't work.
 
My subreports are currently located in the details section of the main report.  My report total (on each page) is located in the details b section, along with the shared variables that bring the totals from the subs.
 
How can I get the shared variables cleared after the totaling of each page?  I'm using Crystal 2008, and I'm stumped!
IP IP Logged
Savan
Senior Member
Senior Member
Avatar

Joined: 14 Dec 2007
Location: India
Online Status: Offline
Posts: 162
Quote Savan Replybullet Posted: 16 Sep 2008 at 11:21pm

Please check if this can solve this ur problem. In the main report  create a group on Employee Id.  Place the shared variable which you want to clear in this group header section.

Thanks
Savan
IP IP Logged
lmeyermba
Newbie
Newbie
Avatar

Joined: 01 Aug 2008
Location: United States
Online Status: Offline
Posts: 2
Quote lmeyermba Replybullet Posted: 17 Sep 2008 at 6:33am
Thanks for replying - I am at a standstill with this!
 
I have a group header for each employee, and I placed a reset formula there for one of the shared variables.  It does not clear the shared variable.
 
I currently have each of the 5 shared variables printing in the details b section (where the page total is also).  If one of the subreports pulls in 0.00, then the shared variable for that subreport continues to hold the value from the previous employee, and adds it to the page total.
 
The shared variable in the main report must be in a section below the section with the subreports.  I have tried placing the page total in the details a and the details b sections and also in the group footer and the page footer, but I'm still not getting the correct total on the page.
 
Any other ideas?
lmeyer
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum