I have created a variable inside a function, which was placed in the detail
section of my report. It's basically just a counter that looks for a
specific value in the detail line. The code for the function looks like
this:
//
NumberVar nGround;
if {Report1.Ground} then nGround := nGround + 1;
//
The report is laid out like this:
Report Header
Page Header
Group Header
Detail (this is where my function is)
Group Footer (this is where I want to reset the variable)
My question is - How do I reset this variable in another section of my
report? I want to set nGround := 0 in the Group Footer, but I haven't been
able to figure it out. There is a similar example in the online help but it
doesn't work either. It says that a variable declared in two formulas uses
the same block of memory (i.e., it refers to the same value.) For example:
Formula #1
NumberVar(x);
x:=5
Formula #2
NumberVar(x);
x=x+15
?x now has the value of 20.?
This doesn't work. Does anyone have any ideas about how to do this???
Thanks
Eric