Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Selecting records Post Reply Post New Topic
Author Message
daves
Newbie
Newbie
Avatar

Joined: 31 Aug 2007
Online Status: Offline
Posts: 1
Quote daves Replybullet Topic: Selecting records
    Posted: 31 Aug 2007 at 10:49am
I, like others I've seen, have been given Crystal Reports 11 and been thrown to the wolves learning how to use it.
 
I can get to the database I want, extract data from it, but need help in selecting certain records.
 
I deal with part numbers.  I want to select only the part numbers with the highest revision level.  My revisions range from 001 to possibly ZZZ.
 
When I run my basic report, the data (simplified) looks like this:
 
PART NUMBER     DESCRIPTION    REVISION      VENDOR
 
2100-01              gizmo                  001              ACME
2100-01              gizmo                  A00              ACME
2100-01              gizmo                  A00               AJAX             
2100-05             gizmo 3                 100               JUNO
2100-05             gizmo 3                 A00              BARKLEY
 
 
What I need in the report is only the two A00 revision occurences for PN 2100-01 and only the single A00 revision of PN 2100-05.
 
I've read some about subreports, but what is the best way to filter for the latest revisions?  I've tried MAX values, but Xtal reports comes back and says something to the effect the data has be extracted before it can find the max values (understandable).
 
Can I be helped?
 
Thanks,
 
Dave
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 01 Sep 2007 at 1:51am
I've written about this before on the forum and I also posted a solution in my new book. Search the forum for Max() and you should find the solution. It requires creating an inner SQL statement to find the max revision and then joining that to the outer SQL select stmt. Anyway, search the forum for a couple posts with the details.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
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.016 seconds.