Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Using a main report paramter in 3 subreports Post Reply Post New Topic
Author Message
VaughnBradley
Newbie
Newbie
Avatar

Joined: 18 Mar 2010
Location: United States
Online Status: Offline
Posts: 4
Quote VaughnBradley Replybullet Topic: Using a main report paramter in 3 subreports
    Posted: 18 Mar 2010 at 6:54am
I have a report that has a data source consisting of the sum of sales grouped by date. The report will only show three values. I want the user to enter one date parameter, for witch all three numbers will be based. The first would get the sum where the date equals the date parameter, the second would sum the dates for the remainder of that month (> parameter date and <= last day of month for parameter date) and the third number would be future sales (> than last day of month for parameter date).
 
My thought was that I would use three subreport and filter them as needed, but I can't seem to reference the main reports parameter. I don't want the user to have to enter in 4 parameters.
 
Does this sound doable? Is there a better way?
 
Thanks for you help.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 18 Mar 2010 at 9:02am
Hi Vaughn,

Yes, you can do this. There are a few important points to know about this.

First off, make sure that the data types are the same. If they are incompatible then you can't use them to link the two reports together.

Second, before going into the Subreport Links dialog box, you have to have the parameter fields already created in both the main report and subreport.

If you have both of those items taken care of, then open the Subreport Links dialog box and choose the two parameter fields to link to in the Available Fields list and the Fields to Link To list. THEN, most important, in the bottom left corner, for the linking field dropdown box, don't use the default that Crystal gives you. Instead, click the dropdown box and choose the subreport parameter field again.  Choosing this field again is the key point to make sure the user doesn't get prompted multiple times.

That should do it for you! And I already have all this documented in Chapter 9 of my Crystal Reports Encyclopedia book. You can learn more at Amazon.com: Crystal Reports Encyclopedia

Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
VaughnBradley
Newbie
Newbie
Avatar

Joined: 18 Mar 2010
Location: United States
Online Status: Offline
Posts: 4
Quote VaughnBradley Replybullet Posted: 19 Mar 2010 at 11:38am
Thanks...worked perfectly!
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.047 seconds.