Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: pass value from sub to main report's Page Footer Post Reply Post New Topic
Author Message
bobjprogenergy
Newbie
Newbie


Joined: 30 May 2012
Online Status: Offline
Posts: 1
Quote bobjprogenergy Replybullet Topic: pass value from sub to main report's Page Footer
     Posted: 30 May 2012 at 4:19am
Hi All,
Scenario:
using crystal report 2008
I have a sub report that pushes its contents to the next page if records are more than 3. I have placed that sub report in the main report's Group Header 1c.
I have a part of the report that I want to be able to display on the first page of the report even if the records are more than 3 and the sub report is pushing contents to the next page. I have accomplished this by placing that part of the report in the Main Report's Page Footer.

Issue:
Now, i want to pass value from sub report to main report for which I m using shared variable in the sub report, but when i use the same shared variable in the main report's Page Footer, i m not getting the value. (Note: I want to use the shared variable value in Main Report's Page Footer because that is where I have the part of the report which I want to display on the first page of the report).

Let's say i move the part of the report (which i want to display on the first page) to the Main report's Group Footer and use the shared variable here, i get the value, but the Main Report's Group Footer is pushed to the next page if records are more than 3 and I want this part of the report to stay on the first page and not go to the next page

please let me know if you have any suggestions

Thank you.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 30 May 2012 at 4:50am
simple question...has the subreport been run before the first page's footer is printed?
 
if no, then there is no way for the report about the value...it doesn't exist.
IP IP Logged
hims_4ever
Newbie
Newbie


Joined: 23 May 2012
Location: India
Online Status: Offline
Posts: 5
Quote hims_4ever Replybullet Posted: 02 Jun 2012 at 9:16am
Hi lockwelle!
Where should I put subreport in main to run before first page's footer?
Thanks,
Himanshu Bhensdadia
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 04 Jun 2012 at 3:47am
well, after re-reading the post...if the report is running in the group header, but is taking more than 1 page to complete, the shared variable probably isn't available yet, which kindof leads to a report slowing solution...
 
you could craft a second subreport that does all that the first does, but doesn't display any values, and run it before gh1c...since there are no results to display, it won't affect the output and you will have you're value before the page footer...but in essence you are running the subreport 2 times, which will slow the report down, especially if there are lots of groups for gh1
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