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

Using Groupnumber in running total formula

Status
Not open for further replies.

jbhsuman

Technical User
Nov 11, 2003
68
US
Perhaps my last post was too long. Sorry but I was trying to be through.

The shorter question is how do you use the groupnumber function within a formula?

I am trying to use running totals to sum a value with multiple criteria, one being to evaluate the balance on the change of a group. Can anyone help me with the correct syntax?
 
I read your other post, and was unclear on the problem, but you might try this in your evaluation by formula section if you want to evaluate only the last record in a group:

{table.group} <> next({table.group}) and//add your other criteria

If you want to evaluate only the first record in a group, use &quot;previous&quot; instead of &quot;next&quot;.

Groupnumber wouldn't be helpful here. You can test this by adding it to one of your group headers. When you have multiple groups, it counts each group header across groups, not just within groups.

-LB
 
LB, thanks for the reply. Sorry my first post was not clear. I may have been too verbose and the question was lost. The problem, in short, is that using a running total as a grand total at the report footer reports incorrect numbers. In my examples in post 1, I was trying to show the logic used for the calculations all were the same with the exception of when to reset the value.

Essentially, I am trying to use a formula to emulate the, “evaluate on change of group” option. Should I use this in conjunction with
Code:
WhileReadingRecords
function?

Once again, thank you for your reply.

Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top