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

Urgent - Passing Shared Values

Status
Not open for further replies.

DianaStewart

Programmer
Apr 16, 2002
58
CA
I am using Crystal reports 7.0. The shared variable values from the subreport are being passed to the
main report only problem is it is giving me the value for the last name rather than for each name...



Sub report contains:

Group Header 1 (Table1.Group)
Group Header 2 (Table1.EmployeeName)
Group Header 3 (Table1.DateEntered) - contains Formula1

Formula1 :

whileprintingrecords;
if month({Table1.DateEntered}) = 1 then
shared numbervar Variable1 := Sum ({@NewNumbers}, {Table1.DateEntered}, "monthly")


When previewing the subreport the values are correct for each Name and month...


Main Report:

Group Header 1 (Table1.Group) - contains the subreport
Group Header 2 (Table1.Nickname)

In the Group Footer I have Formula2:

whileprintingrecords;
shared NumberVar Variable1;
Variable1


The value being carried over is the values for the last name. Do I have to reset each variable
at each Name? If so, where do I do this?


***One other question, my subreport is not linked to any fields in my main report. Do they have to be linked?









 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top