Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shared Variable from Subreport1 to Subreport2 1

Status
Not open for further replies.

troop49

Programmer
Dec 17, 2009
17
US
I can't seem to pass the variable from subreport to another subreport???

In the group footer i have the subreport that does the calc that i need in another subreport with in the same group footer.

In the main report i created a formula call ShrAccumLvlike this: shared NumberVar Leave

Then

In the subreport i created a formula called ShrAccumLvlike this: Shared NumberVar Leave := Sum ({ESYEMLVD.LEAVE_BAL}) * {ESYAPPTR.HOURLY_RATE}

HOW DO I PASS IT ON TO THE SECOND SUBREPORT i can't see it?
 
Thanks for moving your post. You need to have the second sub in a different group footer section, e.g., GF_b, if the first sub is in GF_a. Then you should be able to reference the shared variable in a formula in the field explorer->formula->new in the second sub. I ordinarily add "whileprintingrecords" but it probably redundant since you are specifying "shared". If you need the results to appear to be in the same section, format GF_a to "underlay following sections".

-LB
 
STILL nothing ahhhh!! Help.

My Subreport1 (has my variable i need) in GF#3

then
i moved

Subreport2 (that needs to read variable from SubR1) in GF#2.

and nothing!!!
 
No, if sub 1 is in GF#3_a, then sub 2 should be in GF#3_b.

Please also the content of each formula.

-LB
 
I meant: Please also show the content of each formula.

How are the subs linked to the main report? On what fields? Do these correspond to the groups in the main report?

Also explain in what section you are placing the formulas within each sub.

-LB
 
Just to let you know that after I create GF#3_b.
IT WORKED BEAUTIFULLY.
Thank you!!! Thank you.
Now i can move on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top