Chelseatech wrote:
<<You can do it inside a UFL. If you can write VB, I can send you the source code - it's one line inside a VB function.>>
Thanks, I'm interested. My report is in-house on a LAN, not on the internet. One question, and I should probably know this, but what is a UFL?
Synapsevampire wrote:
<<Sometimes I add in sections during dev for this purpose, and then delete them afterwards.>>
Thanks,
Using that process, I was able to find out what's going on, but not
why?!.
I'm working with Crystal 8.5
I have a Group Header split into 2 sections.
I also have two Shared Variables defined as Boolean and 4 formulas in Basic Syntax to 1: initialize, 2: display variable gDisplayCSRName, 3: display variable gSuppress and 4: Change the values.
In Group Header 1a, I have the following formulas Left to Right:
1: Init Vars
Code:
Shared gDisplayCSRName As Boolean, gSuppress as Boolean
gDisplayCSRName = True
gSuppress = False
Formula = " "
2: display gDisplayCSRName
Code:
Shared gDisplayCSRName AS Boolean
Formula = gDisplayCSRName
The formula returns True, which is correct
3: display gSuppress
Code:
Shared gSuppress AS Boolean
Formula = gSuppress
The formula returns False, which is correct
In Group Header 1b, I have the following formulas Left to Right:
4: Change the values
Code:
Shared gSuppress AS Boolean, gDisplayCSRName as Boolean
'gDisplayCSRName was set True in Formula 1
If gDisplayCSRName Then
gDisplayCSRName = False
End If
'gSuppress was set False in Formula 1
If Not gSuppress Then
gSupress = True
End If
Formula = " "
2: display gDisplayCSRName
Code:
Shared gDisplayCSRName AS Boolean
Formula = gDisplayCSRName
In this case, the formula returns the
incorrect value of True. The value of gDisplayCSRName was changed by formula 4 and should be False.
3: display gSuppress
Code:
Shared gSuppress AS Boolean
Formula = gSuppress
In this case, the formula returns the
incorrect value of False. The value of gsuppress was changed by formula 4 and should be True.
Why don't the variables hold their changed values?