Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Sub Reports within a formula Post Reply Post New Topic
Author Message
Central
Groupie
Groupie


Joined: 16 Feb 2011
Online Status: Offline
Posts: 56
Quote Central Replybullet Topic: Sub Reports within a formula
     Posted: 18 Feb 2013 at 5:26am
Hi,
 
I have a report that depending on a value will display a sub report.
 
e.g.
 
If Type = "P" then
 
display the subreport (with it's own dataset)
 
or if type is "F" then
 
display the other sub report (with it's own dataset)
 
Would this be the best way to do this and if not then what would be.
 
What would the formula look like.
 
Many thanks in advance.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 18 Feb 2013 at 6:01am
Create both subreports and place them in separated sections of your report.  Then set the suppression formula for each of the subreports.  For the report that's supposed to show when Type = P, the formula would be:
 
Type = "F"
 
and for the other, the formula would be
 
Type = "P"
 
Set the sections that the subreports are in to suppress if blank.
 
-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