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

Crystal Reports 7.0 field formatting 2

Status
Not open for further replies.

cjohnson6

Technical User
Jul 19, 2000
21
0
0
US
How do you supress blanks in a report field? Tried using the TrimRight() syntax but when I complete the formula by entering the field I want to supress, it returns a message saying that the result must be BOOLEAN (??).<br>Here's an example of my syntax:<br><br>TrimRight({tcandidate1.city})<br><br>What boolean result or operator is it looking for?<br>Can anyone assist?<br><br>Thanks in advance,<br>Claude Johnson <br>
 
i think this is what you are looking for, put this in the formula next to the suppress box:<br><br>if length(TrimRight({tcandidate1.city}))=0 then true else false<br><br>hope it works for you.
 
i think that might work out for me.&nbsp;&nbsp;going to give it a try in a couple of other scenarios.<br>i really appreciate the response and information.<br><br>thanks,<br>claude
 
I'm guessing you put the formula in a conditional formatting location, such as &quot;format field.&quot;&nbsp;&nbsp;What the boolean formula above will do is suppress the field if there are any spaces to the right of the city field.&nbsp;&nbsp;<br><br>To get a field on your report with the no spaces on the right, you'll want to create a formula such as<br><br>Formula name:&nbsp;&nbsp;City<br>Syntax:&nbsp;&nbsp;TrimRight({tcandidate1.city}))<br><br>Then insert the formula on the detail or section where you want it displayed.&nbsp;&nbsp;It shouldn't require it to be a boolean in a formula field.
 
I'm not sure why you would want to suppress the blanks in the city field. If you want to suppress because you want city, state and zip formatted real nice, put those 3 fields in an text box. It will suppress and format for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top