Setting variable values 
Author Message
 Setting variable values

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



Fri, 26 Jan 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Set Variable = Field Value

2. Setting a variable to the largest record value.

3. Setting Bookmark to Variable value

4. Create an AutoTextEntry with it's value set to a document variable

5. Set many "values" to variables

6. How do I set a static variable value?

7. Set a text file as variable value

8. Setting the value of a server variable from a client script

9. How to set a null value for a data variable

10. How do you set the initial value of a Static variable

11. The value of a variable (String type) is the name of a variable

12. Variable Name to Variable value.

 

 
Powered by phpBB® Forum Software