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

Running Total formula problem with placment in groups

Status
Not open for further replies.

bordway

IS-IT--Management
Sep 24, 2002
54
US
Hi,

I wonder if anyone can explain why a numbervar will change it's value depending on which group section it is placed.
I sometimes need a value to show in the next group but find it changes when I move it down.
As far as I can tell, none of the component values change so I've not been able to figure out what is happening.

Here is an example of the group layout:

Group01 (Plant) Header ---- myCount Reset
Group02 (Class) Header
Details ------------------- myCount - Formula01 - (Value01 / Value02) - NumberVar01 (Formula / Count ) - Plant - Class
Group02 (Class) Footer ---------------------------------------------- NumberVar01 is correct
Group01 (Plant) Footer ---------------------------------------------- NumberVar01 is incorrect
(I've also tried moving the count reset to the Group01 footer)

And here are examples of the formulas I've been trying to use:

//@myCount
whileprintingrecords;
numbervar myCount;
myCount := myCount + 1

//@MyCountReset
whileprintingrecords;
numbervar MyCount;
MyCount := 0

//@Formula01
(Value01 / Value02)

//@NumberVar01
whileprintingrecords;
numbervar NumberVar01;
NumberVar01 := NumberVar01 + {@Formula01}/{@MyCount}

Thanks

Bruce O
 
You need two different RTs if you want to diplay in two different groups. Its unlikely that the reset instruction will be common to both.

Ian
 
It is also much easier to let Crystal create running totals for you. The use of Crystal's automated totals is outlined at FAQ767-6524.


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
>Its unlikely that the reset instruction will be common to both.
>It is also much easier to let Crystal create running totals for you.
Yes, I usually do let Crystal create the running totals.
This was a case where summary and running total menu items are greyed out.
And the component formulas involved are a bit more complicated & now that I look, I'm not sure my example was clear.

>You need two different RTs if you want to display in two different groups
OK, I'll try adding a second running total.

Thanks





Bruce O
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top