Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Suppressing a value on detail. Post Reply Post New Topic
Author Message
User215806
Newbie
Newbie


Joined: 27 May 2012
Online Status: Offline
Posts: 3
Quote User215806 Replybullet Topic: Suppressing a value on detail.
     Posted: 31 May 2012 at 12:03am
I am designing this report in which I am calculating a sum in Main Report based on some criteria from Sub Report. I have embedded my sub-report in a sub section within the main report. Now whenever my sub report is empty, I supress the detail section containing sub report. What I want to do is to check if a Detail section is supress then to not to show a particular field value. I will be grateful for any help.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 31 May 2012 at 3:38am
I think that this might work...you might have to adjust it...
 
create a shared variable.
initialize before calling the subreport.
have the subreport update it
if the shared variable is some value (probably the initial one) suppress the detail section and/or suppress the field as desired.
 
basically use the shared variable as a flag.
 
creating a shared variable is as simple as declaring it:
shared numbervar x;   //can also be stringvar, booleanvar, etc
 
assignment uses the 'assignment' operator :=
comparison is just =
 
Hope this helps, or at least points a way
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