Skip to Content
0
Jun 21, 2021 at 07:52 PM

Crystal Report formula Field

74 Views

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.