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

Global Boolean Var

Status
Not open for further replies.

Cpreston

MIS
Mar 4, 2015
972
GB
We have a group footer with 2 text boxes, Text23 and text28

In text 23 we have some text and in the formula workshop under formatting formulas under Text23 there is supress and the formula is
GLOBAL BOOLEANVAR Trexinorder;
NOT TrexInOrder

In text 28 we have some text and in the formula workshop under formatting formulas under Text23 there is supress and the formula is
if Sum ({@ProductCheck}) = 0 then true;

In both text boxes on the report there are different text, so if an order as Trex in it it displays text 23 and if not text 28.

What I cannot work out is what the GLOBAL BOOLEANVAR Trexinorder;
NOT TrexInOrder
refers to, how does it know if it is trex or not.

I have managed to change the text so it is ok, but I don't understand how the global works, any ideas please.

Thanks
 
I have never heard of TrexInOrder in Crystal Reports. Does this report run inside of an application or maybe TrexInOrder is part of a user defined function?
 
Sorry TrexInorder relates to our products (somehow) it is not part of crystal
 
Trexinorder is a shared variable. Somewhere in your report is another formula that sets it to true or false. Because it is defined as global, other formulas can refer to it.

Look for formulas in your detail line that are suppressed, that's the most likely place to find the formula that sets it - it could even be in a subreport.
 
If I recall correctly, global variables scope is limited to either the main report or a sub-report. Only shared variables can be seen everywhere.
 
Hi

I did a search on TrexInOrder and found a few formula's where it was shown, shown below with NAME and code below. What I don't quite get is how it suppresses if it is not Trex and appears if it is Trex. I will keep examining but thought I would show the findings, might be something obvious to one fo you. Thanks for the replays

NAME - NEW Order:
Global BooleanVar TrexInOrder := False;

TrexInOrder := False;

NAME - Initialise:
Global NumberVar LastSteelGradeID := 0;
Global BooleanVar TrexInOrder := False;

NAME _ Trex Line:
Global BooleanVar TrexInOrder;

If Left({148_vwOrderAcknowledgement.ProductCode},3) = "gTR" Then
TrexInOrder := TrexInOrder OR True;

NAME - Object_visibilty (supressed):
Global BooleanVar TrexInOrder;

Not TrexInOrder
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top