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

How to evaluate a running tot. "on change of group" but with a formula

Status
Not open for further replies.

TekAtWork

Technical User
Oct 1, 2004
7
US
I need to create a running total that gets incremented using two conditions: "on change of group" and if another field = to an specific value. If I choose the "On change of group" option, then I cannot use the formula for the other field, and If I use the formula option to specify the other field, then I don't know how to specify the "on change of group" in the formula option.
I guess my question will be how to specify the running total to increment on change of group, but using the formula option instead.
Any help will be appreciated. Thanks!
 
Since you state " "on change of group" and if another field = to an specific value", then I assume that you mean that it must be for both conditions.

Set the reset to Change of Group, and the evaluate to your formula.

You'll find that both you and the audience will understand requirements better if you use example data and expected output rather than descriptives.

You might even be able to do whatever it is on the database side using SQL. That would require knowing your version of Crystal and database, more standard environment attributes that should be included in every post.

-k
 
Thanks for the tip, I will try to use examples instead.

The problem that I have is that I am trying to format the report to look like a spread sheet, but the crosstab is not an option (at least to my abilities). What I am trying to do is to run totals for each day of the week, but I want to print them right next to each other, so that is why I wanted to use running totals that incremented based on the day, and on the change of the group. I cannot use the reset option, because then I will loose the data to print at the footer, so I was going to use a running total for each day.
I know that An easier solution is to use variables and store the data to be printed at the end in the variables, but I am pretty new in Crystal (and first time user of this forum) and I don't know where to declare them. If you could show me where to declare a var, and how to call it from anywhere in the rep, will be greate.

Thanks, I hope this is not too long too look at!
 
Using running totals, in the evaluation section, choose "use a formula" and enter:

{table.groupfield} <> previous({table.groupfield}) and
{table.field} = "YourValue"

Substitute your group field for {table.groupfield}, etc.

I think you could get more efficient help if you supplied some sample data showing what you are trying to do.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top