3 Replies Latest reply on Aug 31, 2012 7:26 AM by philmodjunk

# Report Sub Total

### Title

Report Sub Total

### Post

I am trying to create a report for invoicing. I am generating reports and i am getting everything as i want it, the only problem im having is totaling for each sections.

I am currenty tryng to do it using a summary that = Total of field (Total) (running with restart, when sorted by Ticket::ContractNumber. The probly is i am only recicving the total of the first value in the sort.

Please see the pictures to understand what i am trying to achive.

• ###### 1. Re: Report Sub Total

I don't quite follow the logic behind a summary of a summary here, nor why you want the running total option for such a sub total.

What is the calculation for "lineTotal"?

What is the "sorted by" field for your sub sumary part?

One observation that I can make is that when you refer to a summary field in a calculation, the field will return the grand total, not a sub total. To get a subtotal from a summary field used in a calculation, use the getSummary function.

It looks to me like you need a Sort Total field that is a field of type calculation that uses the GetSummary function instead of a summary field.

• ###### 2. Re: Report Sub Total

Thanks for the responce

The Line is a calculation of Quanity * Unit Cost.

Sub summary is sorted by Contract Number.

The way the system is designed, the user enters the contract number for the job they are collecting the materials for.

I then want to invoice once a month, but each invoice must have all tickets under each contract number. This report is working perfect and I am seeing the data I need, the only problem is for each ticket they have a total for that order. I wish to give a grand total for that months tickets under each contract number.

Thanks

Steve

• ###### 3. Re: Report Sub Total

If it wasn't for the built in 20% markup of the line item total, you could just put the subTotal field in your sub summary part and it would show the expected sub total. Given that 20% markup, you need to rewrite Total as;

1.2 * GetSummary ( Subtotal ; Contract Number )

Then put Total in your sub summary part.