Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Passing value from subreport to main page footer Post Reply Post New Topic
Author Message
guptaa
Newbie
Newbie


Joined: 21 Feb 2013
Location: United States
Online Status: Offline
Posts: 14
Quote guptaa Replybullet Topic: Passing value from subreport to main page footer
     Posted: 15 Mar 2013 at 8:18am

My sub report is grouped on “Supervisor_id” and then “Part”.

There are 3 different parts. Each part has a different page footer to display. Page Footer isn’t displayed in sub report.

I need to pass the part number to the main report in order to display the footer conditionally in main report.

I placed a formula on detail section of sub report:

shared numbervar v_footer1;

shared numbervar v_footer2;

shared numbervar v_footer3;

 

if {SP_CF17_CPS_UNIT.PART} = 1

then v_footer1 := 1

else if {SP_CF17_CPS_UNIT.PART} = 2

     then v_footer2 := 2

     else if {SP_CF17_CPS_UNIT.PART} = 3

          then v_footer3 := 3

 

Also placed formula on Group4_footer:

WhilePrintingRecords;

shared numbervar v_footer;

 

I suppressed report footer and any other section following Group4_footer.

 

In main report:

Where should I place the sub report so that v_footer value is available for each part to page footer section of main report. Also where to place reset formula to reset v_footer if needed.

 

Would very much appreciate any help, any clue.

Thanks

 

Aradhana
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 18 Mar 2013 at 1:01am
Hi
 
Since you are extracting / pulling group information, place your sub report in part group of your main report.
 
 
Thanks,
Sastry
IP IP Logged
guptaa
Newbie
Newbie


Joined: 21 Feb 2013
Location: United States
Online Status: Offline
Posts: 14
Quote guptaa Replybullet Posted: 18 Mar 2013 at 3:15am
Main report is not connected to any data set. It only contains the sub report and displays the footer.

I needed main report because to bind variables in sub report.

Thanks. Any help would be greatly appreciated. I am just stuck in this report.
Aradhana
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 18 Mar 2013 at 11:07am
So what does your main report actually do?  Also, any variables in the subreport won't be passed out until the subreport is finished.  So, you can't use them in page footers while the subreport is printing.
 
I suggest creating a separate subreport for each section of the current subreport.  From there, I might be able to come up with a way to get the separate page footers.
 
-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