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

Grant Total for a distinct count by group 1

Status
Not open for further replies.

jchewsmith

Technical User
Nov 20, 2006
161
US
I have a report that shows sales and job count for YTD and sales and job count for current month.

I have a formula to show the job count for the month that the report was run but I can't figure out how to get a grand total of those numbers.


Report: Ran february

job count monthly sales ytd job count and ytd sales
ABC Customer 2 500.00 5 1,200.00
so january had 3 jobs at 700.00 but I only want the february job count to display and then I need a grand total of all customers job count
DEF Co 1 100.00 3 350.00

Grand Total 3 600.00 8 1,550.00

 
You need to use a variable to capture values at point where subtotals are displayed and then display var in report footer

If a report wide total you need three formula

@Eval// place in group where subtotals are calculated
Whileprintingrecords;

Global numbervar ytdCount;
Global numbervar ytdsales;

ytdcount:= ytdcount + count(yourfield, yourgroupfield);
ytdsales:= ytdsales + sum(yourfield, yourgroupfield);

@DisplayCount // place in report footer
Whileprintingrecords;

Global numbervar ytdCount;

Repeat for ytd sales
Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top