Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Selecting Records Post Reply Post New Topic
Author Message
tdavenport
Groupie
Groupie
Avatar

Joined: 21 Oct 2008
Location: United States
Online Status: Offline
Posts: 41
Quote tdavenport Replybullet Topic: Selecting Records
    Posted: 11 Jun 2009 at 8:09am
I'm having trouble selecting the correct records. I'm trying to use Record Selection Formulas but I can't seem to get the 'Maximum' or 'NthLargest' to work. When I attempt to use either of these, I get 'a Boolean is required here' or ' ...this must be calculated later' errors.

The challenge is that I only want to return records when the Maximum SequenceID is equal to ‘Networking’. An example of the data is shown below.


The AssignTable can hold multiple records for a given MainID.


For any given MainID, there can be multiple SeqIDs and GroupIDs.  The MainID is a primary key on two other tables and I need to create a join query to pull matching records from those other tables.


MainID                 SequenceID       GroupID

2556                       4568789                Networking

2556                       4569589                Tech

2556                       4590001                Admin

2556                       4590252                Networking

2589                       4622589                HR

2589                       4632587                Networking


In the above scenario, I want to select these two records:

MainID                 SequenceID       GroupID

2556                4590252           Networking

2589                       4632587                Networking

These records should be selected because within a particular MainID, the Maximum (or 1thLargest) SequenceID  is equal to 'Networking'.


I was hoping to do this using the record selection formulas. If you think SQL is required, let me know.


Any and all suggestions are welcome.


Thank you.



Edited by tdavenport - 11 Jun 2009 at 8:11am
Any and all suggestions are welcome.
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.020 seconds.