Showing results for 
Search instead for 
Did you mean: 

Crystal Report formula Field

0 Kudos

I have a crystal report that is collecting data from several fields: job, customer, project name, etc. I have one field I need to include on the report. I need a way to search the table below, if the searchkey has a dataitem name 'Def Rec DT' display that alphaValue, if the searchkey doesn't have a dataItem as 'Def Rec DT' then put a blank.

Data in the database

What I need the formula field to do is:

If the searchkey = ipom.job_number and 'Def Rec DT' in column dataitem display in report else blank.

The problem is in the sql statement, it's pulling AlphaValue and pulling the first alphavalue field in the table so I wanted to create a formula field that can do what I need. If I change the query to say where DataItem = 'Def Rec DT' I don't get the other record I need for the report.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

In CR when dealing with fields that may have null values in them you need to test for null's specifically.

Search for "isnull" and you'll find lots of examples or even better, hit the F1 key in CR Designer to open the Help file