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

Moving data from subreport to main report in Crystal XI

Status
Not open for further replies.

ETCS

Technical User
Joined
Jul 21, 2008
Messages
38
Location
US
I am having a problem passing values from a sub report to the main report. My main report lists tech support personnel and the number of support tickets they closed for the month. The main report is grouped by user name. The sub report provides the number of days the user was available to work (business days minus vacation etc). I am trying to get the days available number into the main report so I can determine the average number of tickets completed per work day. I have created a shared variable on both sides and linked the two by the user ID. However, I am getting the value of the first user listed in the sub report associated to every user in the main report. Below are the variable formulas I am using:

From Sub Report

Shared NumberVar DaysAvailable;
DaysAvailable :={@Total Availability}

In Main Report

Shared NumberVar DaysAvailable;
NumberVar DaysAvailable;
DaysAvailable := DaysAvailable

Any help would be greatly appreciated.
 
The sub should be placed in a group section that is above the section containing the reference to the shared variable, so the sub could be in GF_a, with the formula that references the shared variable in GF_b. The sub should be linked to the main report on the group field. If the sub can have null values, you should have a reset formula in a section before GFa.

Note also that your formula in the main report should just be:

Shared NumberVar DaysAvailable;

You are confusing things by adding a global variable with the same name.

-LB
 
Thanks LB. I followed your advice and now the report is working perfectly. I appreciate your help!

-PG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top