Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: main/sub report sharing a parameter? Post Reply Post New Topic
Author Message
johnwsun
Senior Member
Senior Member


Joined: 28 May 2008
Location: Australia
Online Status: Offline
Posts: 179
Quote johnwsun Replybullet Topic: main/sub report sharing a parameter?
    Posted: 09 Oct 2009 at 4:16am
Hi All,
 
I have a main report, and a sub report in the report footer (not linked). I wonder if they can share a same parameter such as date in the record selection.
{ORD.CDATE} in {?Start Date} to {?End Date}
 
At the moment, there are two date typed parameters for user to type, both for the same date field; one for main report, and one for sub report, which don't look nice. Could any advise on that?
 
John
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 09 Oct 2009 at 10:51am
Yes, you can share a parameter with a subreport. I actually cover this on page 362 of my Crystal Reports Encyclopedia v1 book.

When you open the Subreport Links dialog box, at the bottom left corner is a drop-down box with the field to link to on the subreport. By default, Crystal Reports creates a dummy field for you to link to. But in your circumstance you don't want this. Instead, click on that drop-down box and select the parameter field in the subreport. By linking the two parameter fields together in this dialog box, Crystal will share the same value between them (effectively only prompting the user one time).

HTH,

Brian

You can find out more about my books at Amazon.com


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
johnwsun
Senior Member
Senior Member


Joined: 28 May 2008
Location: Australia
Online Status: Offline
Posts: 179
Quote johnwsun Replybullet Posted: 09 Oct 2009 at 4:43pm
Thank you, Brian. I appreciate for your detailed instruction.
 
Cheers,
 
John
IP IP Logged
johnwsun
Senior Member
Senior Member


Joined: 28 May 2008
Location: Australia
Online Status: Offline
Posts: 179
Quote johnwsun Replybullet Posted: 11 Oct 2009 at 9:54pm
Hi Brian,
 
Is it possible to have one grand total for Main and sub-report instead of Two? the Latter is currently my circumstance where I have one record selection parameter (as you advised for the two report ) but with two grand total.
 
My main report is different from the sub report due to the item types; main one  has item types such as books, equipment, etc, the sub report has serial/magazine types. Due to the database structure I cannot put these items with different item types into one report; that's why I took main/sub reprot approach which has been achieved.  The problem now only left is the total (both reports have grand total in terms of item prices.
 
I wonder if you would contine to provide some valuable advices on that. Thanks in advance.
 
John
 
IP IP Logged
johnwsun
Senior Member
Senior Member


Joined: 28 May 2008
Location: Australia
Online Status: Offline
Posts: 179
Quote johnwsun Replybullet Posted: 11 Oct 2009 at 10:52pm
Hi Brian,
 
I have managed to resolve the query I posted a short while ago about a grand total for main and sub report.
 
cheers,
 
John
IP IP Logged
johnwsun
Senior Member
Senior Member


Joined: 28 May 2008
Location: Australia
Online Status: Offline
Posts: 179
Quote johnwsun Replybullet Posted: 12 Oct 2009 at 10:35pm
Hi Brian,
 
Can the above main/sub report be converted into a crosstab report?
Because the above report is 'Detailed' report while I wish to have a summary report which combines both report. Could you please advise?
Thanks in advance.
 
John
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.031 seconds.