Hey everyone. I am new to Crystal Reports and have a question.
I will try to explain it the best I can:
I have 2 tables.
Probsummarym1 is the Record which contains a primary key NumberPRGN.
Activitym1 is linked to this table via NumberPRGN, but it is not the primary key for Activitym1.
(I am also using the table IncidentsA1, but it is not causing the problem, because there is a 1 to 1 relationship with Probsummarym1)
Below is my Formula to pull in the records I need:
If
((((Date({PROBSUMMARYM1.OPEN_TIME})<{@Date 11}) and
{PROBSUMMARYM1.ASSIGNMENT}="SECURITY" and
{INCIDENTSA1.ASSIGNMENT}="SECURITY" ) and
{ACTIVITYM1.TYPE}="Closed") and
{PROBSUMMARYM1.CLOSE_TIME}>{@Date 11} and
{PROBSUMMARYM1.CLOSE_TIME}<={@Date 12}) then 1 else
If
(({ACTIVITYM1.TYPE}="Reassignment"
and {ACTIVITYM1.DESCRIPTION} like '*to SECURITY*') and
{INCIDENTSA1.ASSIGNMENT}<>"SECURITY" and
(((Date({ACTIVITYM1.DATESTAMP})<{@Date 10}) and
({PROBSUMMARYM1.CLOSE_TIME}>{@Date 10}) and
(Date({PROBSUMMARYM1.CLOSE_TIME})<={@Date 11}) and
{PROBSUMMARYM1.ASSIGNMENT}="SECURITY"))) then 1 else 0
I then have a formula that Sums this formula.
This formula pulls in 62 records accurately. However, because a few of Records have multiple identical activities, these records get counted twice. There are actually only 58 records with unique NumberPRGN values.
I need to be able to count the record only once. That is, I should not have multiple records with the same NumberPRGN.
Once I can get a formula to accurately give me the number 58, that value will need to go into a chart.
I am using Crystal Reports 9. I would really appreciate any help! Thanks!
Edited by davidj028 - 17 Jul 2009 at 10:29am