I have a selection I want to create a subtotal based on a change in the name.

Ie,

I have a selection of tickets and the names of the individuals who opend them, I want to count/add up the number of tickets that each individual used to open

I tried

Numbvar Person

Whileprintrecords;
If {[TableName.NewCallAuthor]} = "PersonName" then

Person = Person + 1

Which isnt what I want and doesnt work

I want it to count for each change in person.

Any suggestions?

MKoslof

04-13-2004, 08:30 AM

Why not make life easier for yourself and use grouping :). If you group by NewCall Author you can do a running total and the get the amount for each group, get the total for the entire database, etc. If you have never used grouping, you can use the wizard to get started..create a new report and choose to use grouping levels.

Also, in terms of a formula, look into the Count() method.

NumberVar sCount:=0,

sCount:= Count({table.myField});

sCount

swoozie

04-13-2004, 08:34 AM

The report is set up to group based on Open and Closed Tickets., there is a sub report also. the Report is Displayed as follows.

Name - Count of Open
name - Count of open
Total - Count of Open

Then after this is displayed, we need to count the number closed and divide that by the number opened per person and the total number opened overall.

will the sample you gave me work in that instance with minor modifications?

MKoslof

04-13-2004, 08:36 AM

Yes, the Count(field) functin can be modified via any standard math fuction (*, -, +, Remainder, Mod, etc.). Basically can write your formula to count() all records then do some sort of modifcation if needed. Good luck.