Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Display Non-Matching Criteria Post Reply Post New Topic
Author Message
lroth
Newbie
Newbie


Joined: 14 Feb 2014
Online Status: Offline
Posts: 2
Quote lroth Replybullet Topic: Display Non-Matching Criteria
    Posted: 14 Feb 2014 at 7:20am

I am trying to create a report to tell me who requires a certain qualification/license for their job (based on the data in our system), and then display those who do not have it in the system.

 

Ex: Rachel Test is compliant because she has an RN license, which is required for her job, along with other qualifications that I don’t care about. Joan Test is not compliant because she does not have an RN license, but it is required for her job, along with other qualifications that I don’t care about.

 

My results are displaying the following:

Employee        Qualification Code

Rachel Test     RN                             

Rachel Test     AA Degree

Rachel Test     Background Check

Joan Test         AA Degree

Joan Test         Background Check

 

How do I get Crystal to display a line item for Joan Test to indicate that she is not compliant because she does not have an RN license?

 

When I use a formula, I am still not about to get it to work properly as it returns the following:

 

Formula=

if {TABLE.CODE} <> ["RN"] then

    "Non-Compliant"

Else

    "Compliant"

 

Results=

Employee        Qualification Code     License Availability

Rachel Test     RN                              Compliant

Rachel Test     AA Degree                  Non-compliant

Rachel Test     Background Check     Non-compliant

Joan Test         AA Degree                  Non-compliant

Joan Test         Background Check     Non-compliant

 

Any assistance is greatly appreciated!

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Feb 2014 at 10:14am
I would prefer to use the tables to do the work if you have the data set to support it.
However you can do this using group criteria
group on the employee
change your formula to return a 1 instead of compliant and a 0 instead of non-compliant
sum this formula on the group of the employee
and group result >0 is compliant and any=0 is non-compliant
use that reult to display as you see fit
 
if SUM(formula,employee)=0 then 'Non-compliant' else
if SUM(formula,employee)>0 then 'Compliant' else 'ERROR'
 
IP IP Logged
lroth
Newbie
Newbie


Joined: 14 Feb 2014
Online Status: Offline
Posts: 2
Quote lroth Replybullet Posted: 17 Feb 2014 at 5:35am
This worked great. Thank you.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.029 seconds.