cancel
Showing results for 
Search instead for 
Did you mean: 

How to suppress one field if another field is null

Former Member
0 Kudos

Hi All

I have a report with the following;

How do I suppress if is null? There is other information on the report that I need kept so I can't suppress everything. At the moment it is printing;

J45200/0

/0 I want a blank line here.

J20048/0

thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Right click on the field select format field and navigate to common tab. In the Suppress formula section enter the condition ie., isnull()

Revert for further clarifications

Former Member
0 Kudos

Thanks for the quick response. I had tried that to no avail.

Former Member
0 Kudos

Right click on the field select format field and navigate to common tab. In the Suppress formula section enter the condition

ie., isnull() or * = 0*

Try with this...

Former Member
0 Kudos

Thank you so much for your suggestions. The formula is highlighting the '0' with the message ' A string is expected here'

Former Member
0 Kudos

Check with this!!

isnull() or = '0'

Former Member
0 Kudos

Formula is now OK but text object is still there!!

Former Member
0 Kudos

Check whether is null. Place the next to the text field. Tell me the value displayed in the .

Former Member
0 Kudos

Thanks for all this. The field is null. If there is a job no. it will display followed by the text object and another field . If there is no {job no} there is a blank space where a job no would be displayed.

Former Member
0 Kudos

Okay... Since it displays a blank space.

Please check with this!!

isnull() or = '0' or =' ' or = ''

It should work fine now...

Former Member
0 Kudos

Hi Ana

I have been thinking about this and do you think the problem is the text object (and the suppress formula) is after the field, therefore crystal is reading the formula after the field and can't go back?

Former Member
0 Kudos

Hi,

i want supress text object when BD field is zero the DB field name is {Sp_Optional_New_OutstandingMIS_BIllWise_newformat_27032009;1.Serv Chrgs - HO} then i right click on text object -> common tab ->suppress here i posted the below formula

isnull({Sp_Optional_New_OutstandingMIS_BIllWise_newformat_27032009;1.Serv Chrgs - HO})

or ({Sp_Optional_New_OutstandingMIS_BIllWise_newformat_27032009;1.Serv Chrgs - HO}) = '0.00'

or {Sp_Optional_New_OutstandingMIS_BIllWise_newformat_27032009;1.Serv Chrgs - HO}=' '

or {Sp_Optional_New_OutstandingMIS_BIllWise_newformat_27032009;1.Serv Chrgs - HO} = ''

but it's showing error A Number is requuired here and 0.00 is highlating.please guide me how to solve this ?

Regds,

Sampath Kumar.

Former Member
0 Kudos

Hi Sampath,

why you are putting 0.00 in between single inverted comas. Remove the comas.Hope that will work.

Hi duffey,

Sorry for late reply.

As per my experience, Crystal will not consider blank space as 'null'. So try to fill your database field value with 'null'. Otherwise replace that field with 'null' using 'Command'(query). if it is null , 'Is Null' function will work properly.

Regards,

Salah.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Let me know some more information,

1, What is your datasource?

2, What will be the value of jobno in database if it is null(Null or 0(Zero) or Blank Space).

3, both jobno and text fields are in same table or not?

4, Seqno is database field or formula field?

regards,

salah

Former Member
0 Kudos

Hi Salah

Thanks for trying to help me;

1. The datasource is Ingres

2. Value of is blank space if null 3. is a string, {text object} is inserted text object

4. is a number field from same table as

I hope I have given you the answers you need

Thanks

duffey