Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: Group Total of Shared Variable Values Post Reply Post New Topic
Author Message
pjmatelli
Newbie
Newbie


Joined: 28 Feb 2013
Location: United States
Online Status: Offline
Posts: 1
Quote pjmatelli Replybullet Topic: Group Total of Shared Variable Values
    Posted: 28 Feb 2013 at 10:44am
Hello,
I am new to this forum and have been reading and searching through the posts.  I have not been able to find my specific problem, so here it is:

I have a report which displays Freight Bills (FBs) that rode a trip (trucking business).  Those FBs have weights on them.  FB 1 can ride trip #2000, and can be on Leg 1 and Leg 2 of a 3 Leg trip.  I have figured out how to get a sum of the weight in a subreport.  I pass that value to the main report via a shared variable and place that value in the Group footer (grouped by Trip #).

What I need to do now is at the next group level (grouped by company in a multi-company environment) get a total of those weights for the company.  Here is an example of the data

Company 1
  Trip #2000
    Leg 1
      FB1     500
      FB2     750
      FB3     250
    Leg 2
      FB1     500
      FB2     750
    Leg 3
      FB2     750
  Trip #2001
    Leg 1
      FB1     750
      FB2     500
    Leg 2
      FB1     750

Trip #2000 - Total Weight is 1,500 (I can get this number)
Trip #2001 - Total Weight is 1,250 (I can get this number)

The trip total weight is a value in a subreport that I am using in the main report via a shared variable.

My question is:  how can I get my report to total the weight of 1,500 + 1,250 for the company?

Thank you in advance for any and all help and guidance.  I hope my explanation is clear.

         
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 16 Apr 2013 at 7:31am
use another variable to accumulate the total value for the next group. Remember to initialize it in the group header.

HTH
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.000 seconds.