Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Passing a field from Sub to main in Footer Post Reply Post New Topic
Author Message
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Topic: Passing a field from Sub to main in Footer
     Posted: 01 Nov 2012 at 10:50am
Hi,

I have a field in the footer of a sub report in that I want passed back to the main report. I then want to evaluate that field in the group footer on the main report to surpress

example field footer  in subreport is eventondos
the subreport runs in the detail section of the main report
I want to surpress the group footer on the main report  if the eventondos ='yes'

Just not sure how to pass it on to the GF on the main...

Sorry for the confusion

Thanks
Joe
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 02 Nov 2012 at 8:35am
shared variable in teh subreport.
declare the variable in both the subreport and the main report the same way:
shared stringvar anEvent;
 
set it in the subreport:
shared stringvar anEvent;
anEvent := {table.field};  //or whatever is appropriate
 
evaluate it in the mainreport:
shared stringvar anEvent;
anEvent = "yes"  (in the section expert supression formula)
 
you just have to run the subreport prior to trying to supress the group footer.
 
HTH
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