Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Shared Variable not displaying detail in Main Repo Post Reply Post New Topic
Author Message
oscarfernandez
Newbie
Newbie


Joined: 07 Oct 2008
Online Status: Offline
Posts: 2
Quote oscarfernandez Replybullet Topic: Shared Variable not displaying detail in Main Repo
     Posted: 07 Oct 2008 at 12:33pm

Hi All- Apologies since I am new to this forum.  I have seen this post & others that describe how to use a shared variable so that you can display a value form a sub report in the main report.  However I have the same need of this posting to show the detail info from the sub report in the detail sections of the main report.  I followed the steps for the creation of shared variables (sub report in the header section & shared variable in the section below) but when displaying in the main report it only shows me the last value in my grouping. See my example below:

 
Subreport values:

Month

AvgPtsSeen

Jan

25

Feb

26

Mar

20

 
Main Report Vaues

Month

TotalPtsSeenDr

Jan

17

Feb

16

Mar

18

 
Current Result:

Month

TotalPtsSeenDr

AvgPtsSeen

Jan

17

20

Feb

16

20

Mar

18

20

 
Desired Result:

Month

TotalPtsSeenDr

AvgPtsSeen

Jan

17

25

Feb

16

26

Mar

18

20

 
Any help would be greatly appreciated.
 
Posting new topic just in case...
 
-Oscar
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 07 Oct 2008 at 1:54pm

That's the way subreports work.  You can't get ALL of the values from it, just the last one.  To get this to work you would have to link to the subreport the details data in the main report.  I would then condense the report down to just one section - details or group, it doesn't matter - the width of the data you want to display in your desired result (so it looks like a field instead of a subreport!) and put the subreport in the column where you want the data to display on your main report.  No variables are required.

However, there may be a way to do this without using any subreports - subreports WILL slow down report processing.  What do your tables look like?  Can you describe what you're trying to do?
 
-Dell
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