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!

Suppress Field Border 2

Status
Not open for further replies.

yotwiggy

Programmer
Aug 1, 2002
11
0
0
US
In CR9 when setting the field border it does give you a suppress box and a place to put a calculation. I am trying to suppress the border based on a value in the record being displayed, but Crystal gives me an error at every turn.
Suppress if:
{fieldx} = "Y" --> tells me the outcome must be a number
{fieldx} = 1 --> tells me it expected a string.

HELP!
Thank you.
 
Try this inside your formula:

if {fieldx} = "Y" then
1
else
0

The return value needs to be a number 0 - 4. Each number identifies one of the border types.

0 - None
1 - Single
2 - Double
3 - Dashed
4 - Dotted


~Brian
 
The X+2 box isn't really a "suppress" box for borders, so your formula has to specify what you want it to do. If you have a single line around your field, and you want to, for example, eliminate the top line conditionally, create a formula like this:

if {fieldx} = "Y" then crNoLine else crSingleLine

The attributes available to you are shown under "Functions"->"Line Style" in the X+2 formula area.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top