INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Global Boolean Var

Global Boolean Var

(OP)
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

RE: Global Boolean Var

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?

RE: Global Boolean Var

(OP)
Sorry TrexInorder relates to our products (somehow) it is not part of crystal

RE: Global Boolean Var

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.

RE: Global Boolean Var

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.

RE: Global Boolean Var

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close