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

Supressing Field information?

Status
Not open for further replies.

mpodlesny

Programmer
Mar 23, 2005
24
US
I am using Crystal 8.5 and in the data area of my report I have the following


"Day of the Week: Monday"

The label of "Day of the Week" is a text object and "Monday", is a database field object

What I want to do is if the database field object is blank (its a text field in the database) I want to not show the label "Day of the Week". How do I supress that? or what is the best way?

 
Right click on the text object->format object. Under the common tab check suppress and click on the x+2 button and add the following formula

not isnull({table.field})

Cheers,
-LW
 
great that worked, thanks!

Now how do I suppress the entire blank line?
 
Hopefully, you placed the entire line in a section of its own. If you haven't then do so.

Then right click on the section located on the left side of the design canvas and clck on format section. Under the Common tab, click on suppress and click on the x+2 button and enter the same formula.
 
Are you sure that worked for you? That formula provided would suppress the field when the field is NOT null, and you wanted it suppressed when it is null.

Anyway, to suppress the whole line, you need to go to the Section Expert.

Report menu, Section Expert.
Highlight the section that you want to suppress and click the X+2 button to the right of "Suppress (No Drill Down)"
In the editor, enter the following line:

isnull({table.field})

Save and Close

~Brian
 
Brian,

Isnull will evaluate to a true, which means that the suppress remains checked and the line not displayed. Not isnull will evaluate to a false, which will uncheck the suppress button and display the line.

-LW
 
LW-

I agree with your last statement, but that contradicts the formula you posted in your first post:

not isnull({table.field})

You want to suppress the line when it the field is null, not when its not null.

~Brian
 
You're right. My mistake. Haven't finished my first cup of coffee yet.

-LW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top