Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Multiple Records Vs. Single Record Post Reply Post New Topic
Page  of 2 Next >>
Author Message
sfhess
Newbie
Newbie


Joined: 23 Feb 2012
Online Status: Offline
Posts: 7
Quote sfhess Replybullet Topic: Multiple Records Vs. Single Record
     Posted: 23 Feb 2012 at 10:40am
I am trying to create a report that shows students with a combination of two codes (notation code and tracking code) in separate fields in a record, but the students I need to show must only have the one record with this combination of codes in the table.  There can be several records with the same notation code in the table but I don't want to see students with multiple occurences of this particular notation codes.
 
I'm sort of a beginner so keep it simple please.  Thanks for any help.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Feb 2012 at 11:13am
i can't really follow your question.
can you post some sample row level data and what you need to do with it based on that sample?
IP IP Logged
sfhess
Newbie
Newbie


Joined: 23 Feb 2012
Online Status: Offline
Posts: 7
Quote sfhess Replybullet Posted: 23 Feb 2012 at 11:45am
02
FAFSA ERROR! SEE STAFF 07/15/2011
25 FILE COMPLETE DATE 07/15/2011 07/14/2011 NR
28 COUNSELOR REVIEW 07/15/2011 07/14/2011 NR AA/ LN
32 FTP NEED ANALYSIS 07/15/2011 04/27/2011 NR
A1 Academic Transcript #1 07/14/2011 07/14/2011 RQ EAST LA COLLEGE
IE EOPS INDEPENDENT 07/15/2011 NR INDEPENDENT
M2 FILE FOLDER OUT TO: 07/15/2011 NR
SP SAP CHECK - FIRST SEMESTER 07/15/2011 RQ
SQ SAP CHECK - SECOND SEMESTER 07/15/2011 NR
OK.
 
Case above shows two records (highlighted in red) with "RQ" in column 5, one with "SP" in column 1 and another with "A1" in column 1.  I don't want to see this or similar records in m report.
 
Case below shows one record with "RQ" in column 5 and "SP" in column 1.  This is what I want to see in my report.
 
 
 
02 FAFSA ERROR! SEE STAFF 03/21/2012
25 FILE COMPLETE DATE 03/21/2012 NR
28 COUNSELOR REVIEW 03/21/2012 NR CHECK NSLDS. LN
32 FTP NEED ANALYSIS 03/21/2012 01/25/2012 NR
IE EOPS INDEPENDENT 03/21/2012 NR INDEPENDENT
M2 FILE FOLDER OUT TO: 03/21/2012 NR
SP SAP CHECK - FIRST SEMESTER 03/21/2012 RQ
SQ SAP CHECK - SECOND SEMESTER 03/21/2012 NR
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 23 Feb 2012 at 12:11pm
create a formula like {in/out}
if {table.column1} = "sp" and {table.column5}="rq" then true else
//(you can add as many combinations as you want)
if {table.column1} = "??" and {table.column5}="??" then true else
false

then place this formula into select expert like
{in/out}=true

this should work

Edited by kostya1122 - 23 Feb 2012 at 12:12pm
IP IP Logged
sfhess
Newbie
Newbie


Joined: 23 Feb 2012
Online Status: Offline
Posts: 7
Quote sfhess Replybullet Posted: 23 Feb 2012 at 12:48pm

Thanks for responding.

Can I substitute the {table_name.field_name} for {table.columnx} in my formula? 
 
I will try this tomorrow.
IP IP Logged
sfhess
Newbie
Newbie


Joined: 23 Feb 2012
Online Status: Offline
Posts: 7
Quote sfhess Replybullet Posted: 05 Mar 2012 at 8:27am
I guess I didn't make myself totally clear.  The two lists of records I displayed are sets of records for particular students who attend the college where I work.  I only want to see a line on my report for the student in the second case, who only has one of the records with "RQ" in the fifth column, "SP" in the first column, and no other records in the table with "RQ" in the fifth column.
 
Right now, I see a report line for each case.    List currently shows approx. 1500 instances that meet the selection criteria, but we are looking to see a dozen or so.
 
Plus, I need to know exactly where in Crystal I need to put the changes needed to show the students properly.


Edited by sfhess - 05 Mar 2012 at 8:30am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Mar 2012 at 9:08am

you have to use the group select expert options for something like this

group on student
create 2 formulas to be able to flag a group
//flag1
if 5th column='RQ' and first column='SP" then 1
//flag2
if 5th column='RQ' and first column<>'SP" then 1
sum both of these formulas at group level 1 (per student)
now you can srudents exlude records using these 'flags'
in the select expert toggle it to use group statement
sum(@flag1, student)>0 and sum(@flag2, student)=0


Edited by DBlank - 05 Mar 2012 at 9:09am
IP IP Logged
sfhess
Newbie
Newbie


Joined: 23 Feb 2012
Online Status: Offline
Posts: 7
Quote sfhess Replybullet Posted: 05 Mar 2012 at 10:13am
How/where do I perform the "SUM" for the two formulas at the group level?
 
Also I keep getting  a "Missing ")"" message when I try to save the statement in the group statement in the select expert.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Mar 2012 at 10:29am

use the sigma sign ( the blue E)

select field to summarize as @flag1
calculate this summary as a SUM
summary location = Group 1 (student group)
OK
this will drop the SUM of you flag1 into the group footer
repeat using @flag 2
 
Group select statment will be something like
sum({@flag1}, {table.studentid}) > 0 and sum({@flag2}, {table.studentid})=0
 
replace this table.studentid with your actual table name and field for stuident that you created group 1 on
IP IP Logged
sfhess
Newbie
Newbie


Joined: 23 Feb 2012
Online Status: Offline
Posts: 7
Quote sfhess Replybullet Posted: 06 Mar 2012 at 5:14am
Thanks.  I'll give it a shot.
IP IP Logged
Page  of 2 Next >>
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