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

formula for displaying field only when boolean is set to true 3

Status
Not open for further replies.

dinshak

Technical User
Oct 31, 2007
39
US
have a database field for customer signature (displays name of the signer) that I want to display on report only when it is "T" true and not when it is "F" false
 
Right Click Field ->Format select common tab

Opposite the suppress check box is a formula box,

To Suppress just enter

BooleanFormula = False

Ian
 
HI

Thanks for your reply I did what you asked me to do but it still displays the name of signer even if it is False.

The field is INVESTIGATION.X_OOS_8_INVSIGNER (name of signer) which needs to show up only when INVESTIGATION.X_OOS_8_INVSIG (boolean field) is set to true

so i put in this formula
{INVESTIGATION.X_OOS_8_INVSIG} = "False" TO the field
INVESTIGATION.X_OOS_8_INVSIGNER

 
if i remove the quotes the error message is

A string is required
 
I think you need to verify how {INVESTIGATION.X_OOS_8_INVSIG} displays. Place it in the detail section and then right click on it->browse field and then report back with the results.

Also, in what section does the signature display? Place the field {INVESTIGATION.X_OOS_8_INVSIG} in the same section and make sure it has the expected value in that section.

-LB
 
{INVESTIGATION.X_OOS_8_INVSIG} is a field in the database and is not displayed anywhere on the report as i do not want to display true or false on the report, but i want to display {INVESTIGATION.X_OOS_8_INVSIGNER}based on the invsig (boolean) field that is selected.

{INVESTIGATION.X_OOS_8_INVSIGNER} is in the report footer section.
 
I am asking you to put it on the report temporarily to check the way it actually displays.

-LB
 
this is the result I get after browsing the fields.

the {INVESTIGATION.X_OOS_8_INVSIGNER}displays names of signers
{INVESTIGATION.X_OOS_8_INVSIG}displays T or F
 
Dinshak

Sounds like the field in the database is not a true boolean.

You will need to add the following to the Select Statement of the report (or coding)

Code:
{INVESTIGATION.X_OOS_8_INVSIG} = "T"

Having this in the Selection criterea means you dont have to hide the data within the report - it will just bring down those rows that meet the criterea.

Cheers

GV
 
Or use a suppression formula of:

not({INVESTIGATION.X_OOS_8_INVSIG} = "T")

'J
 
You should right click on the signature in the report footer->format field->suppress->x+2 and enter:

{INVESTIGATION.X_OOS_8_INVSIG} = "F"

The reason I was asking you to put in the detail section is that in the report footer, this field will contain the value of the last detail in the report or in the last group, if there is one. If the value is the same in all details (which would seem to make sense in this case), then the above formula should work fine.

-LB
 
SIMILARLY if the database field {INVESTIGATION.X_NCMR} is left blank then display NA. How do I display this?
 
If the field is a string:

if isnull({INVESTIGATION.X_NCMR}) or
trim({INVESTIGATION.X_NCMR}) = "" then
"NA" else
{INVESTIGATION.X_NCMR}

if the field is a number:

if isnull({INVESTIGATION.X_NCMR}) then
"NA" else
totext({INVESTIGATION.X_NCMR},0,"")

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top