cancel
Showing results for 
Search instead for 
Did you mean: 

Setting a Global Variable in Record Selection

Former Member
0 Kudos

I would like to declare and initialize a Global variable in the Record Selection section. This code is inserted into the record selection formula:


.....
Global x As Number
x = 10
.....

But when I try to use x in one of the report sections, I get nothing, as in ....


Global x As Number
Formula = x         'returns nothing

Is it not possible to declare and initialize a Global variable in the Record Selection section?

Thank you,

Art

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Please use "While Reading Records" as the first line in the formula where you are using this variable.

If there is no change then assign the value of x to some other variable in the record selection (say y) and then use 'y' in the desired formula along with "While Readig Records".

Pleas elet me know the results.

Thanks

Answers (1)

Answers (1)

Former Member
0 Kudos

That was it. Thank you Prathemesh.

Art