Talk with the Author
 Crystal Reports Forum : General Information : Talk with the Author
Message Icon Topic: Linking Sub-Report Prompts to Main Report Post Reply Post New Topic
Author Message
Vania
Newbie
Newbie
Avatar

Joined: 21 Aug 2007
Location: Australia
Online Status: Offline
Posts: 1
Quote Vania Replybullet Topic: Linking Sub-Report Prompts to Main Report
    Posted: 21 Aug 2007 at 2:06am
Hi Brian,
 
I am writing a Crystal Report which requires several sub-reports to collect information because of the data-structure.  I have a prompt in the sub-report which call for a certain set of criteria only i.e. surface type.  I have linked the sub-report to the main report and now would like to filter the information from the main report using the sub-report prompt.
 
Is this possible.  I have read your book and do not find reference to this in there.
 
 
Regards Vania
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 21 Aug 2007 at 8:23am
This one is a bit unusual. You can't set the record selection formula to use data from the subreports because at the time the report is run, during Pass #1, the subreport data isn't available yet. So you can't filter on it.

A way around this is to use Shared variables in the subreport and then in the main report I would use conditional formatting on the Details section. Create a formula which uses the Shared variable to determine if the record should be excluded or not. If so, return True so that the record is suppressed. This effectively lets you apply a manual record selection filter on the data and hide the records you don't want shown.

HTH.
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
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.