Link to home
Start Free TrialLog in
Avatar of Gordon Hughes
Gordon HughesFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How to add a total

I have a report that has some sub reports with declared values carried forward into the main report, working fine
I have added some figures together to have a total against each record, also working OK

I would like to have some totals (of the line totals) shown in the report footer, how can I do this?
Have attached files
Gordon
sample-Completed-Work-Order-Costs-V1.pdf
Completed-Work-Order-Costs-V1.rpt
Avatar of Mike McCracken
Mike McCracken

What totals do you want?

I created totals for contractor hours and cost.

Formulas I added.

zDeclareTotals
WhilePrintingRecords;
Global NumberVar Total_ContractorHours;
Global NumberVar Total_ContractorCost;

''

Open in new window


zDisplayTotalContracotrCost
WhilePrintingRecords;
Global NumberVar Total_ContractorCost;
Total_ContractorCost

Open in new window


zDisplayTotalContractorHours
WhilePrintingRecords;
Global NumberVar Total_ContractorHours;
Total_ContractorHours

Open in new window


Formulas I modified
ContractorHours
WhilePrintingRecords;
Shared NumberVar ContractorHours;
Global NumberVar Total_ContractorHours;
Total_ContractorHours := Total_ContractorHours + ContractorHours;
ContractorHours

Open in new window


ContractorsHoursCost
WhilePrintingRecords;
Shared NumberVar ContractorCost;
Global NumberVar Total_ContractorCost;
Total_ContractorCost := Total_ContractorCost + ContractorCost;
ContractorCost

Open in new window


I then added a text box to display the total coat and hours in the report footer.

mlmcc
Completed-Work-Order-Costs-V1revA.rpt
Avatar of Gordon Hughes

ASKER

Hi mimcc

Good to hear from you
The total you calculated is not quite right
The total you would show is 58/975

The totals I am after would be
14/£420  14/£231  £100  £400  £1051

Hope this makes sense
Have attached 2 files

the CP version I am using is 11.5.0.313

Gordon
Completed-Work-Order-Costs-V1revB.rpt
completed-work-order-costs-v1reva.pdf
Hi mimcc
I think I have half sorted the issue
I removed some tables from the main report which was causin duplication
Can you add add the other totals, pleases

Gordon
completed-work-order-costs-v1revb.pdf
Completed-Work-Order-Costs-V1revB.rpt
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
mimcc is the best, excellent solutions
Super support