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

Not suppressing tab - Formula Help

Status
Not open for further replies.

JBourne77

IS-IT--Management
Jan 21, 2008
153
US
I am not getting an error message on my formula, however the detail section I placed this on is not suppressing the details tab. I added this to my details A tab under the x-2 tab on the suppress tab. I'm not sure if I need to re-write this differently or whats broken.

Code:
{?SHOWDETAIL} = False 
AND
IF {Data.Type} <> 1 THEN
    TRUE
ELSE IF {Data.Diagnosis} = -1 AND ISNULL({@TicketNumber}) THEN
    FALSE
ELSE IF {Data.Diagnosis} = -1 AND {@TicketNumber} = "" THEN
    FALSE
ELSE IF {Data.Diagnosis} = -1 AND {@TicketNumber} = {Data.TicketNumber} THEN
    TRUE
ELSE
    FALSE
 
If you create a formula using

IF {Data.Type} <> 1 THEN
TRUE
ELSE IF {Data.Diagnosis} = -1 AND ISNULL({@TicketNumber}) THEN
FALSE
ELSE IF {Data.Diagnosis} = -1 AND {@TicketNumber} = "" THEN
FALSE
ELSE IF {Data.Diagnosis} = -1 AND {@TicketNumber} = {Data.TicketNumber} THEN
TRUE
ELSE
FALSE

and place this in details is it returning the correct value?

Ian
 
IanWaterman -

Yes, that works fine. I tried adding in the "{?SHOWDETAIL} = False AND" part to an all ready working formula and it seems to not like that.
 
False + True = False

try changing your formula to

Code:
IF Not {?SHOWDETAIL} Then
IF {Data.Type} <> 1 THEN
    TRUE
ELSE IF {Data.Diagnosis} = -1 AND ISNULL({@TicketNumber}) THEN
    FALSE
ELSE IF {Data.Diagnosis} = -1 AND {@TicketNumber} = "" THEN
    FALSE
ELSE IF {Data.Diagnosis} = -1 AND {@TicketNumber} = {Data.TicketNumber} THEN
    TRUE
ELSE
    FALSE



Gary Parker
MIS Data Analyst
Manchester, England
 
GJParker -

This seems to not make a difference either in my testing.
 
Please explain the logic you require to suppress your details section.

Gary Parker
MIS Data Analyst
Manchester, England
 
The Logic is, the End User has a check box on the third party application that indicates "Show Detail ?". If they check it, they get back this detail tab. If they uncheck it, they dont see the results.

As I mentioned earlier, I tried adding in the "{?SHOWDETAIL} = False AND" to the previous formula on there and it seems to not like what I did. Not sure how I can combine them both.
 
If this is the condition
{?SHOWDETAIL} = False

The surely this must override your other conditions, because detail will be suppressed full stop.

Thus Gary's suggestion should work, ie you only want the other suppression to kick in when user wants details.

Ian
 
Try:

{?SHOWDETAIL} = False or
{Data.Type} <> 1 or
(
{Data.Diagnosis} = -1 and
not isnull({@TicketNumber}) and
trim({@TicketNumber}) <> "" and
{@TicketNumber} = {Data.TicketNumber}
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top