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

Value Increases on Refresh

Status
Not open for further replies.

dancar

Technical User
Mar 23, 2001
32
US
I have a report which produces a chart based on a formula which I would normally do as a running total. As I understand it, charts can't be based on running totals, so I've added a global variable which is initiated in the report header as

Global NumberVar var := 0

Then in the detail section I have the formula
NumberVar var;
var := var + 1

The group footer then contains a formula using var, which is then used in the chart in the footer. Also, because I have a chart, it seems that the formulas must be calculated before run time.

I'm finding that when I tweak the run time of the formulas, I can get the values and the chart to display correctly. But if I refresh the data, the var value seems to start at 334 instead of 0, and the formulas that use this value and the chart are knocked out of whack.

How can the values change during a refresh when the data source is static? Is the variable not reset during refresh?
 
Please don't start multiple threads on the same topic. Your variable formula will not display correctly unless you use 'whileprintingrecords'. I'm guessing you might be using this in one of the formulas, but not the other two. As I mentioned in an earlier thread, you need to use the method for charting on print-time formulas that I gave you the link for.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top