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

Shared Variables

Status
Not open for further replies.

slickp

Technical User
Feb 15, 2006
35
GB
Ok i'm using crystal 10, i have a report and a sub report and i would like a field from the sub report being placed into my main report. So i'm using shared variables. In the sub report my formula is:

whileprintingrecords;
shared stringvar PTYPE := ({QUOTECLIENT.FSAClientType})

and in my main report my formula is:

whileprintingrecords;
shared stringvar PTYPE;
PTYPE

I have split the group and put the subreport in the a section of the group and the above formula in the b section of the group.

However the correct information is not coming through from the subreport. Have i missed anything? Help?
 
Sorry plus i have the rest formula on the in the same group and the formula is as follows:

whileprintingrecords;
shared stringvar PTYPE := "";
 
Try
Code:
whileprintingrecords;
shared stringvar
PTYPE:=PTYPE

If that fails, try displaying the value in the subreport, just to confirm it is there.



[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Exactly where in teh report have you placed the formulas and subreport, please be more accurate tahnd section a and b are they in group headers or footers ?

Ideally you should have the 3 objects in different sections in the order

Reset Formula
Subreport
Display Formula

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top