cancel
Showing results for 
Search instead for 
Did you mean: 

Replacing Null Values With Text

Former Member
0 Kudos

Hi,

I'm new to Crystal Reports 2008 and have what I hope is a simple query.

I have created a report that pulls it's data from an SQL DB (Our Helpdesk Package) and some of the results are blank but can still be clicked on to drill down.

Is there a simple way of replacing any blank values received with some text....let's say "Not Set" or something like that.

Many thanks in advance.

Matt

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can write a formula in Crystal Reports to check whether it is null or not and display the required text accordingly


if  (isnull({dbvalue}) or ({dbvalue} ='')) then 
       "Display the required text"
else
       {dbvalue}

I hope this is what you required.

Former Member
0 Kudos

Hi,

Many thanks for your fast response.

Exactly where would I put this formula? do I put it in the record select statement?

Matt

Former Member
0 Kudos

In the Field Explorer you can able to see Formula Fields. Right Click on it and give the formula name and then opens Formula Workshop - Formula Editor. Now give the conditional formual as said earlier.

Once formula is created then you can place in the report. When ever the field is null then it will display the text.

Former Member
0 Kudos

Brilliant!!! It worked a treat.

Much appreciated!!!

🐵

Answers (0)