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

Problem with shared variables

Status
Not open for further replies.

kwirky

MIS
Apr 22, 2010
85
AU
Hi,
I am trying to share a variable from a subreport to the main report, but when I add the shared variable to the main report, the last entry from the subreport keeps repeating in every line.

Subreport shared variable
@SharVar
whileprintingrecords;
shared numbervar x := (DistinctCount ({app_quality_control.jobno}, {@PersonResponsible}))

Main Report formula
@SharVar QADetails
whileprintingrecords;
shared numbervar x

I have placed the subreport the report header, but even if I move it around it doesn't change the value.

I am using CR 2008.
 
What are you expecting to see? If you want a different value per the PersonResponsible group in the main report, then move the subreport to a group section, link on the group field, and then suppress all but the subreport footer (where your formula should be placed);

-LB
 
That worked PERFECTLY!!!!

Thank you so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top