Print Page | Close Window

Duplicate data

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=491
Printed Date: 02 May 2024 at 11:17pm


Topic: Duplicate data
Posted By: dldatacoord
Subject: Duplicate data
Date Posted: 10 Apr 2007 at 9:09am
I have a formula that looks first for values that begin with "ABC" and then looks for value of testing "123" with a timestamp attached to that value.
I am getting duplicate results of the value of "123" due to the fact that I have an "ABC.01" and an "ABC.02".
 
For example:
1.  ABC.01
     a.  4/10/07 10:00am       6.5
     b.  4/10/07 10:00am       6.5
     c.  4/10/07  11:30am      6.8
     d.  4/10/07  11:30am      6.8
 
When I look to the original data file, 1. also has the value of ABC.02
 
My formula is as follows: {...}="123" and {.....} startswith "ABC" and {...timestamp} in DateTime (  ) to DateTime (   )
 
Any ideas on how I can have this show the values of 123 only once?


-------------
dls



Replies:
Posted By: hilfy
Date Posted: 10 Apr 2007 at 10:42am
Do you want the earliest or latest timestamp for "123"?  Are you grouping on "ABC"?
 
Set up a group on "ABC" (if it doesn't already exist in your report), then either sort (if you don't need further groups) or group on "123" after the "ABC" group.  Set up the new sort or group to be either ascending or descending, depending on whether you want the first or last value.  Then put the information for "123" in an "ABC" group header section instead of in a detail section. 
 
If I understand your problem correctly, this should work.  If not, please post an example of how the data should look and I'll see what I can come up with for you.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: dldatacoord
Date Posted: 10 Apr 2007 at 10:51am
I want one of each, because they have different results attached.  What I don't want is two of each.

-------------
dls


Posted By: hilfy
Date Posted: 10 Apr 2007 at 10:54am

Ok, I've got it....Group on the timestamp after the group on the "ABC".  Put your timestamp data in the timestamp group header.  This should get you just one copy of it.

 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: dldatacoord
Date Posted: 10 Apr 2007 at 10:57am
I am not grouping on ABC, because I don't want the results of 123 to be separated by ABC.01 and ABC.02.
 
ABC.... is a filter to select which data to look at.
 
The data to be pulled has 4 qualifying pieces.
It first must come from site #1
Second, it must have a qualifier which begins with ABC
Third, I am looking for test 123 to have been run
Fourth, I want the values for test 123 each time that it was run.


-------------
dls


Posted By: hilfy
Date Posted: 10 Apr 2007 at 11:08am
However, you CAN group on a formula:
 
Left({table.qualifier}, 3)
 
This will get you the first three characters of the field - hence your "ABC".  Which would put them all together.
 
However, you may not even need that group since you want them all combined.  In which case, you just group on the timestamp.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window