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

hide section based on content of an array

Status
Not open for further replies.

UHsoccer

Programmer
Apr 24, 2003
139
US
I need to hide a segment if a userID does NOT exist in an array containing userIDs.
Here is what I tried

whileprintingrecords ;
shared stringvar array usersID;
numbervar loop0;
numbervar display ;

for loop0 := 1 to ubound(usersID) do (
display := StrCmp (usersID[loop0],totext{USER_ID},0,"" )));

The answer is TRUE, how can I decide based on True and False?
 
Hiding a segment means hiding a section?

Assuming that this section/segment means a section of the report, such as the details, right click the section, select format section or section expert (you should at least post the version of your software when requesting help), select X 2 next to suppress and use:

whileprintingrecords ;
shared stringvar array usersID;
totext({USER_ID},0,"") in usersID

If it's true, it will suppress that section of the report.

Hope this handles it, if not, please post technical information:

Crystal version
Database/connectivity used
Example data
Expected output

-k
 
Thanks for your help, I got it to work just fine
Using CR10
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top