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!

Maximum of Running Total 1

Status
Not open for further replies.

LLBean123

Technical User
Apr 25, 2014
5
0
0
US
Hi,

I have a report that shows sales lines in the detail section (hidden), and then totals for each sales invoice in Group Footer. In the detail section, the Lead Time (in days) is repeated on each line, since the lead time is the same for the entire transaction.

I have a running total that sums the Days, evaluating only once per Sales Transaction, and never resetting.

In the report footer, I have the correct grand total of Lead Days.

I would like to pull that Grand Total into the Group Footer, so I can use it in a calculation to show the transaction's lead days compared to the average lead days of all transactions.

Here is an simplified example:

(D) Item a $4 3 days (hidden section)
(D) Item b $5 3 days (hidden section)
(GF) TOTAL $9 3 days

(D) Item c $6 4 days (hidden section)
(GF) TOTAL $6 4 days

(RF) TOTAL $15 7 days DistinctCountOfTransactions: 2

In each GF, I would like to show the average lead days is 3.5 (7 divided by 2), so the end user can compare individual lead times against the average.

Can anyone explain how I could accomplish this?
Thanks!
 
The simplest way to do this would be with a Sub Report ("S/R") in the Report Header that calculates the Average Lead Days and use a Shared Variable to pass the value back to the main report. By hiding all sections of the SR and formatting it to "Hide Blank Sub Report" it will not be visible in the RH.

You can then put a formula in the GF section that displays the Variable value.

If you need help with the code for the Shared Variable, just let us know and we will be happy to help.

Cheers
Pete
 
You solved it, Pete! Thank you SO much for all your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top