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

Passing Variable to Previous Groups 1

Status
Not open for further replies.

shipcd

MIS
Mar 31, 2003
19
0
0
US
I have a requirement to create a variable to total all hours falling within Plan and include only a portion of those falling into Groups WITHIN Plan. This I have. My problem is that I also need to pass that final total back up to previous groups to utilize in a formula to calculate averages per group (as percent of total plan hours).

When I utilize DISPLAY.Variable option, it, for obvious reasons, pulls the totals as of that group only - and not the final total.

How can I get it to pull the final total into the "percent of plan" formula?
==========================================================
Example:

Plan
Total Hours As Percent of Plan

Group 1 1 1/10 = 10%
Group 2 1 1/10 = 10%
Group 3 5 5/10 = 50%
Group 4 3 3/10 = 30%
===========================================================
Total Plan Hours 10


Your knowledge and assistance would be greatly appreciated!
 
Assuming the total pln hours can't be computed within the main report until the end of the report is reached, you would need to work around this problem by inserting a subreport (returning that total to the main report via a shared variable) in the report header.

Alternatively, see if you cab compute it within the SQL (perhaps as a subselect).

hth,
- Ido


CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thank you very much for the excellent idea. It was a quick and easy solution to utilize the sub-report. I then passed the final variable to the main report for use in the denominator. Voila! It works! It works!

Much appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top