Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Help needed with Subreport Shared Variables Post Reply Post New Topic
Author Message
kendo469
Newbie
Newbie


Joined: 21 Dec 2010
Online Status: Offline
Posts: 4
Quote kendo469 Replybullet Topic: Help needed with Subreport Shared Variables
     Posted: 22 Dec 2010 at 3:47am

Hi,

I have a Sub Report with -

Grouped by Supervisor

Group Footer2 / Agent1 Total Performance data = 10

Group Footer2 / Agent2 Total Performance data = 15

Group Footer2 / Agent3 Total Performance data = 20

Group Footer2 / Agent4 Total Performance data = 25

 

And a Main Report with -

Grouped by Supervisor

Group Footer2 / Agent1 Total Activity Data = 10

Group Footer2 / Agent2 Total Activity Data = 15

Group Footer2 / Agent3 Total Activity Data = 20

Group Footer2 / Agent4 Total Activity Data = 25

 

I want to add the two values together to give me an overall figure

 

I have the following formula on the Group Footer2 on the Sub report -

WhilePrintingRecords;

Shared NumberVar DTV: = Sum (Agent performance data)

 

I have the following formula on the Group Footer2 on the Main report -

WhilePrintingRecords;

Shared NumberVar SNV:= Sum (Agent activity data)

 

Back on the Sub Report I add these two together with -

{@DTV} + Shared NumberVar SNV

 

 This is what I get -

 

Sub Report -

Grouped by Supervisor

Group Footer2 / Agent1 Total Performance data = 10 (Adds only last record of main report = value 45 to each of these)

Group Footer2 / Agent2 Total Performance data = 15 (Adds only last record of main report = value 45 to each of these)

Group Footer2 / Agent3 Total Performance data = 20 (Adds only last record of main report = value 45 to each of these)

Group Footer2 / Agent4 Total Performance data = 25 (Adds only last record of main report = value 45 to each of these)

 

Main Report -

Grouped by Supervisor

Group Footer2 / Agent1 Total Activity Data = 30 (Adds only last record of sub report = value 25 to each of these)

Group Footer2 / Agent2 Total Activity Data = 35 (Adds only last record of sub report = value 25 to each of these)

Group Footer2 / Agent3 Total Activity Data = 40 (Adds only last record of sub report = value 25 to each of these)

Group Footer2 / Agent4 Total Activity Data = 45 (Adds only last record of sub report = value 25 to each of these)

 

How do I get it to add each Agent's individual Performance & Activity data together, rather than showing the last record of each?

 

Any help would be greatly appreciated as I have a deadline for this report to be created by and I am stuck at the moment.

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