Skip to Content
avatar image
Former Member

Formula to determine if specific data exists in a linked table

Hi,

I have a report that pulls a gift summary and need to split totals between employees and nonemployees by determining if an "Employee" code exists in a Constituency table containing multiple entries for each donor. My Donor table is linked to the Constituency table with a left outer join. I've been able to get the right information in the report body using groups and summary tools, but ran into trouble when trying to transfer the summarized field to a cross tab. How can I set up a formula that returns a single yes/no answer for each record in my Donor table so I can use that field in the cross tab?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Mar 30, 2016 at 04:15 AM

    Hello Dawn,

    Is it possible for you to make use of an SQL statement?

    (SELECT Count(1) FROM DONOR WHERE EMP_CODE is not null and EMP_ID={TABLE.ID})

    and in a formula check if Count is greater than 0 then Yes else No.

    Regards

    Niraj

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Dawn,

      You'd need to use a SQL Expression (if you're reporting directly against tables/views).

      Could you elaborate on


      "need to split totals between employees and nonemployees by determining if an "Employee" code exists in a Constituency table containing multiple entries for each donor".

      Does the 'Employee Code' have a specific value? What column does it refer to?

      -Abhilash

  • avatar image
    Former Member
    Mar 30, 2016 at 01:01 PM

    You could use an SQL Expression also. Have a read of this blog to get you up and running:

    The Crystal Reports® Underground

    Add comment
    10|10000 characters needed characters exceeded