cancel
Showing results for 
Search instead for 
Did you mean: 

Need to disply 'No Data' in place of blanks

Former Member
0 Kudos

Hello All,

I want to display 'No Data' where ever there are blank spaces in crystal report.

I have tried many formulae but none ofthem worked. Please help me to find the correct one.

if isnull({Query1.Client's Priority}) then 'no data'

else {Query1.Client's Priority}

this doesnt work.

I tried

if({Query1.Client's Priority})=""then 'no data'

else {Query1.Client's Priority}

this doesnt work

Please help asap...Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Have you tried the combination like :

if isnull({Query1.Client's Priority}) or ({Query1.Client's Priority})=" "

then 'no data'

else {Query1.Client's Priority}

Thanks,

Sastry

Former Member
0 Kudos

no i havent ...let me try

Former Member
0 Kudos

No it dint work...everytime it gives me an error.

" The result of selection formula must be a boolean"

Former Member
0 Kudos

Hi

I think you are using this in Record Selection, try to create a formula from Formula Fields and place this formula on your report to get the resultes.

If you are using this formula anywhere else please let us know.

Thanks,

Sastry

Former Member
0 Kudos

I am following this path

Report>> selection formula>>record

then the window posp up and I am writing my formula there.

Pls let me know if i am doing wrong and pls let me knw the right way of doing it.

Thanks a lot

Former Member
0 Kudos

Hi

You will have to create a formula and place the formula in your report. Correct procedure is :

Go in ViewField ExplorerUnder field Explorer you will find Formula Fieldsright click and newgive a name to your formula. It will open a window here you will have to type the formula which we had discussed in our earlier post then click on save and close.

Now place this formula (drag and droP) in your report in place of your database field.

Thanks,

Sastry

Former Member
0 Kudos

Thanks Shastry...it worked .

Thank you so much.

But I have one problem here.

In some of the fields i already have dragged and dropped another formula which is already there.

How can i make two formulae work together.

Thanks

Former Member
0 Kudos

Infact the formlae that i was trying they also work here. which one do u reccomend ?

The one u sent or the ones that i was trying

Former Member
0 Kudos

Hi

Can you open the formula and check what you have inside, please past the formula here to check.

Thanks,

Sastry

Former Member
0 Kudos

Combination will always help you. In my formula I am checking both conditions. Please retain combination formula.

Thanks,

Sastry

Former Member
0 Kudos

if isnull({Query1.Client's Priority}) then 'NULL'

else {Query1.Client's Priority}

I am using this formula and it worked the way you told me.

Now my concern is i already have this formula in one of the fields

if ((cdate({Query1.Created Date}) < cdate(2008,10,01)) and

isnull ({Query1.Anticipated ROI}) and

isnull ({Query1.Anticipated ROC}) and

isnull ({Query1.Project Benefit Selection})) then 'In-flight as of 10/1'

Else If ({Query1.Checkpoint Stage}) = 'B' and

isnull ({Query1.Anticipated ROI}) and

isnull ({Query1.Anticipated ROC}) and

isnull ({Query1.Project Benefit Selection}) then 'Chkpt B Inprogress'

Else ({Query1.Anticipated ROI})

How can I also add the above formula to this one as i want to display "Null' where ever there is blank in this column as well

Former Member
0 Kudos

ok i will use combination formula.

Former Member
0 Kudos

Sastry,

Can you pls tell me abt this

I am using combination formula and it worked the way you told me.

Now my concern is i already have this formula in one of the fields

if ((cdate({Query1.Created Date}) < cdate(2008,10,01)) and

isnull ({Query1.Anticipated ROI}) and

isnull ({Query1.Anticipated ROC}) and

isnull ({Query1.Project Benefit Selection})) then 'In-flight as of 10/1'

Else If ({Query1.Checkpoint Stage}) = 'B' and

isnull ({Query1.Anticipated ROI}) and

isnull ({Query1.Anticipated ROC}) and

isnull ({Query1.Project Benefit Selection}) then 'Chkpt B Inprogress'

Else ({Query1.Anticipated ROI})

How can I also add the above formula to this one as i want to display "Null' where ever there is blank in this column as well

Former Member
0 Kudos

What is the name of this formula ?

Sastry

Former Member
0 Kudos

the name i have given to this formula is Anticipated ROI.

it is the percentage and it displays inflight.... where ever it satisfies the condition , that i have already given.

Now i also want to display 'Null' in this column as well where there are blank spaces

I have around 20 fields in my report , the formula u gave me worked on one of themn and i am trying it on other fileds as well but the above fied ROI already has a formula so how can i combime two formulae together ...the one already there and the one you gave me for this particular foiled.

I hope my question is clear.

Thanks

Former Member
0 Kudos

hey sastry,

I have figured that out...Thanks for ur suggestions,

Now this formula was for string,

if isnull({Query1.Client's Priority}) or ({Query1.Client's Priority})=" "

then 'NULL'

else {Query1.Client's Priority}

what will be the one for date time

Former Member
0 Kudos

Hi..

For date you will have to use only isnull option like

if Isnull Then "No Date"

Thanks,

Sastry

Former Member
0 Kudos

I tried this

if Isnull ({Query1.Solution Needed By})Then "Null"

else ({Query1.Solution Needed By})

it says ' string is requied'

Former Member
0 Kudos

Hi

Try the following :

if Isnull ({Query1.Solution Needed By})Then "Null"

else Totext({Query1.Solution Needed By})

Thanks,

Sastry

Former Member
0 Kudos

No this dint work, although there is no error but still it dsplays the blank spaces

Former Member
0 Kudos

Sastry,

Can you please tell me the same query given below for a Date time and number function as well. This worked for all my fields that were in string.

Thanks a lot!!!

Former Member
0 Kudos

Hi

For Date fields use the below one

if isnull({Orders.Order Date}) or year({Orders.Order Date}) = 0

Then "This is null"

else

Totext({Orders.Order Date})

For Number fields use the following

if isnull() or = 0

Then "This is null"

else

Totext()

Thanks,

Sastry

Former Member
0 Kudos

Thank you very much Sastry

Answers (0)