Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: How to restrict records to certain ID #s? Post Reply Post New Topic
Author Message
00331data
Newbie
Newbie
Avatar

Joined: 09 Mar 2011
Online Status: Offline
Posts: 13
Quote 00331data Replybullet Topic: How to restrict records to certain ID #s?
    Posted: 13 Apr 2011 at 9:55am
Hi:
 
I have record ID numbers like this:  2011.346, 2011.346.1, 2011.346.2, etc.  The first number, 2011.346, is the umbrella number for all other records starting with 2011.346.  I have 1000s of groups of records that will have a record representing the whole (2011.346) with other records representing the parts (2011.346.1, .2, .3 etc.). 
 
I am writing a report where I want to include records with ID numbers that only have two components (2011.346) and I want to exclude any records with an ID number that have a third component (2011.346.1, etc.).
 
I have two ways to insert this ID number in my report:  there is a field that holds the entire number and there is a group of fields that break the number into components (but doesn't include the "." between the components). So these fields are SortPrefix , Sort1 (2011), Sort2 (346), Sort3 (1, 2, or 3, etc.)
 
Does anybody know of a way to restrict the records that display in the report to only the records that have Sort1 and Sort2 populated?  I would need a formula that will insert the "."s between the component numbers.


Edited by 00331data - 13 Apr 2011 at 9:59am
thanks,
00331data
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 13 Apr 2011 at 12:05pm
If I understand you correctly, you actually have 4 fields - one that contains the whole record ID and one each for the three parts of the record ID.  Correct?
 
Assuming that Sort3 is null when there are only two components, try this:
 
1.  Create a formula (I'll call it "SelectIt") that looks something like this:
IsNull({table.Sort3})
 
2.  In the Select Expert, edit the selection formula by clicking on the formula button and adding the following to whatever criteria is already there:
 
This will return to your report only the records where there is no Sort3 value.
 
-Dell
IP IP Logged
00331data
Newbie
Newbie
Avatar

Joined: 09 Mar 2011
Online Status: Offline
Posts: 13
Quote 00331data Replybullet Posted: 13 Apr 2011 at 12:39pm
Thank you very much, I will try this.
thanks,
00331data
IP IP Logged
00331data
Newbie
Newbie
Avatar

Joined: 09 Mar 2011
Online Status: Offline
Posts: 13
Quote 00331data Replybullet Posted: 14 Apr 2011 at 7:42am
Hi: 
 
This is a different kind of record suppression, & I hope I can explain it adequately.
 
In the report that I'm writing, the primary table I'm using is called Parties.  So each record is about one person.  There is information about this person in other tables.  So I am pulling in fields from the Catalog table, which is about objects, to see how the person is related to the object. 
 
There are fields in the Catalog table that tells how the person is historically related to the object.  There may be more than one person that is historically related to the object in the Catalog table record, people other than the person in my report from the Parties table. 
 
So, say, a person in one of my records in my report is Joe Smith.  But the people in the repeating Historically Related field are Joe Smith, Mary Jones, & Susan Dey.  I only want to see Joe Smith as the Historically Related person in my report.  Thus, I want to suppress the entries in the Catalog table for the Historically Related People of Mary Jones & Susan Dey. 
 
Does anyone know how I could create a formula to do this?
thanks,
00331data
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.031 seconds.