Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: SubReport Post Reply Post New Topic
Author Message
dutyfree
Newbie
Newbie


Joined: 21 Jul 2008
Online Status: Offline
Posts: 24
Quote dutyfree Replybullet Topic: SubReport
     Posted: 29 Jul 2008 at 8:51am
I have a main report which has parameters passed from stored proc linked and also some parameters created on the main report. I have a subreport which needs to be displayed if one of the parameter value from the main report is different from the default value. The subreport has the same parameters as the main report so it can be passed over if the selected parameter from the main report requires subreport to be displayed instead.

Is it possible to do this? any ideas guys!

Thanks


Edited by dutyfree - 29 Jul 2008 at 8:52am
IP IP Logged
saoco77
Senior Member
Senior Member


Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
Quote saoco77 Replybullet Posted: 29 Jul 2008 at 9:26am
In the section expert of the main report

For the section that has the subreport create a formula and place it in the "x-2" formula box next to suppress. Do not click the suppress checkbox.

Based on what you wrote I think the formula should look something like

{?parameter}<>"default value"

Sarah
IP IP Logged
dutyfree
Newbie
Newbie


Joined: 21 Jul 2008
Online Status: Offline
Posts: 24
Quote dutyfree Replybullet Posted: 29 Jul 2008 at 9:36am
Hi Sarah

Thanks for the quick response. Ok the parameters get copied to the subreport but i wish to display subreport if one of the parameter from the main report is not a default value. I have 10 parameters and one of the parameter contains three values which needs to display a subreport if they are chosen unless they are defualt which means the default main report will be displayed.

Regards

Naresh
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 29 Jul 2008 at 2:23pm

Sarah's response is basically correct.  You don't need to do anything in the subreport itself.  In the Main report, set the suppress formula for the section in which the subreport is located.  Use your parameter name and specify to suppress if the parameter is equal do whatever the default value is.

-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