Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Stopping a Subreport from being generated Post Reply Post New Topic
Author Message
Sven
Newbie
Newbie


Joined: 28 Mar 2008
Online Status: Offline
Posts: 12
Quote Sven Replybullet Topic: Stopping a Subreport from being generated
     Posted: 07 Jul 2008 at 12:58am
Hello
 
is there a way to stop a subreport from being generated?
 
The background of my question: I want subreports only being generated if a certain condition is true.
 
Thanks in advance
Sven
Keep trying :)
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 07 Jul 2008 at 1:27am

Hi,

You can create a Flag in your main report, with values True or False something like this
 
1)Create a Parameter in your main report asking the user whether he wants to generate sub-report data or not.
 
If the value is True generate subreport data else suppress the subreport.
 
2)So you will need to link the subreport on user choice parameter value,for that create formula in main report which will hold the parameter value,then link that formula field to your subreport once you link a {?Pm-@test} parameter will be created in your subreport.
3)just check for the value of that link field in your record selection formula of subreport  {?Pm-@test} = 'True'
 
Same way you can check for certain condition in your mail report if that is satisfied generate subrepport else suppress.
 
Cheers
Rahul

 

 

 

IP IP Logged
Sven
Newbie
Newbie


Joined: 28 Mar 2008
Online Status: Offline
Posts: 12
Quote Sven Replybullet Posted: 16 Jul 2008 at 2:23am
Hi Rahul
 
It is working!!! Many thanks for your hints Smile
 
Sven
Keep trying :)
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