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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass shared variable from one subreport to another subreport

Status
Not open for further replies.

jasonhuibers

Programmer
Sep 12, 2005
290
CA
Crystal Reports 10

Subreport1

Details section:

Formula:
shared stringvar varCUSIP;
varLName := {SP.report_LName};


Subreport2
Details section:

shared stringvar varLName;
varLName


I am trying to pass the shared stringvar varLName from Subreport1 to the matching LName in Subreport2, but it seems to be taking the last value in the varLName in subreport1.
 
You need to place the second subreport in a details_b section. A shared variable will only show up correctly in a section below the one in which it was set up. If you need to, you can format detail_a to underlay following sections.

-LB
 
Actually subreport1 is on GrpHeader3i and subreport2 is on GrpHeader3p located on the Main report. Where should I be init the variables?
 
Do I need to add a condition if previous.... what do you think?
 
Is group #3 a group based on the name field? You won't get matches unless they are linked at the name level.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top