Skip to Content

Crystal Reports 13: Comparing Two string fields

Hello,

I need to write a formula that compares two fields and then shows if that comparison does not match and/or is missing then displays those conflicts.. I'm trying to research this online b/c my Crystal training really didn't go into Formulas as I have to take the advanced training.

For instance I have a field called

{PMEQMT.EQNO} and another field called

{rpt_Cycles_Wimmerton_.Tool-Code Text }

Both of these fields should have matching tool numbers. However, I know that is not the case for 500+ records. PMEQMT.EQNO is from our ERP system and rpt_Cycles_Wimmerton.Tool-Code Text is from our Access database. So, I'm trying to show what is missing or mis-aligned in our Access database.

PMEQMT.EQNO is where every item has a tool number. rpt.cycles wimmerton is the field that is missing or has incorrect tool numbers. I need to add this formula to my report to show the missing or incorrect/not matching tool numbers.

Thanks!

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Jan 10 at 08:13 PM

    So I created this formula and put it into my report. It displays the value from the EQNO field when the rpt_cycles field is Null.

    So, now I need to suppress all the items except for the item numbers that show up in the formula column I just created.

    I'm not sure how to do that either but I really appreciate the help and I'm trying.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 10 at 08:14 PM

    This is the formula I used.

    if isnull({rpt_Cycles_Wimmerton_.Tool-Code Text }) then
    {PMEQMT.EQNO}

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 10 at 09:40 PM

    Okay, I figured it out.

    if isnull({rpt_Cycles_Wimmerton_.Tool-Code Text }) then
    {PMEQMT.EQNO} else "ok"

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 10 at 10:14 PM

    Or, if you just want to show the numbers that don't exist, take out the "else" statement in your formula. You can then suppress the rows where the field is empty, just showing the data that missing from the access data.

    -Dell

    Add comment
    10|10000 characters needed characters exceeded