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 Mike Lewis 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 Totals 1

Status
Not open for further replies.

jesperengel

Technical User
Nov 7, 2005
18
DK
Using CrvXI

I have a report with 3 groups. I have made a running total (Total shots), which evaluates every record and resets after change of Group 3. It gives me something like this:

Player Club Ball Total Shots

Jack Titleist Titleist 1
2
3
4
Thomas Titleist Titleist 1
2
3
4
5

What I want is the maximum number in each combination i.e.

Player Club Ball Total Shots

Jack Titleist Titleist 4
Thomas Titleist Titleist 5

How is this best done??

I have tries doing a Maximum on the Running Total, but was not allowed to do this.

Thank you!!
 
If name is your group #3, then copy the groupnames for all groups into the group #3 footer, and place the running total there. It will show the final running total for that group.

If you wanted to use the results some other way in the report, a different method would be required. Are you sure you need a running total in the first place? Do you get the correct results if you right click on and insert a count on {table.shots}? If so, that would be the preferred method, since running totals are slower. You could then use the results in a formula by using the following for the subtotal:

count({table.shot},{table.name})

-LB
 
Thank you lbass,

The last solution your suggested worked fine for counting two groups using

Count({Stroke.IdentifierData.PlayerName},{Stroke.IdentifierData.ClubName});.

Is there any way I can include the third group ({Stroke.IdentifierData.BallType})??


As for your first suggestion, I do not have a field {table.shots}. It is a running total, which evaluates every record and resets after change of Group 3, and I cannot insert a count on the Running Total.

Thank you!
 
I'm not sure what you did. Please explain your group structure by telling us which fields were used for Group #1, Group#2, and #3 (in order), and also explain how you set up the running total for total shots. Specifically, you have not indicated the field you are using and the summary. I'm still not convinced you need to use a running total--if you are evaluating for every record and have not used any group selection, you should be able to right click on the same field that you are summarizing in the running total and insert a summary--at any (or all) group level you wish.

-LB
 
Lbass thank you for your reply.

I will try and explain in detail.

I have three data fields.

1) Player
2) Club
3) Ball

I have grouped each field Group 1 (Player), Group 2 (Club), and Group 3 (Ball), and put them in the Details section. Each group I have Suppressed if Duplicated. This gives me a list of each of the combinations made with the three parameters: Player, Club, and Ball.

Then, for each combination used, I want to list how many shots were made with that specific combination. So far I have done a running total (Count), which summarizes a unique shot id, evaluates for each field and resets after change of Group 3. This gives me a list where each combination is numbered from 1 to x, but I would like to have just the total number of shots made with each combination.

The Report I can generate looks like this:

Player Club Ball Total Shots

Jack Titleist Titleist 1
2
3
4
Thomas Titleist Titleist 1
2
3
4
5

What I would like to have is:


Player Club Ball Total Shots

Jack Titleist Titleist 4
Thomas Titleist Titleist 5

I just read your reply again, and I see where you are going. Making a simple summary on each of the fields actually gives me the right number under the Ball summary. But I cannot place this Summary in the Details section to put it on the same line as the rest of the information.

Any suggestion?

Thank you!!
___________________________________________________________
 
Lbass,

I got it!! Thank you.

I do not know why making a simple summary on Ball gives me the right number but never mind. To put the summary for ball in the Details section I just made a ToNumber (Count ({Stroke.IdentifierData.BallType}, {Stroke.IdentifierData.BallType}));

which worked fine.

Again Thank You for putting me on the right track.
 
Instead of using "suppress if duplicated," you could use the group footer for Ball. Drag all the groupnames there. The inserted summary for the Ball group will appear there already. Then suppress the group header and footer.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top