Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a group 2

Status
Not open for further replies.

ddrake

Technical User
Mar 19, 2003
92
Hi all,
Got a question on creating a particular group. Looking at two fields (IncidentID and CaseID) I need to create groupings of records where Incident ID = "Original" and include all the other records where their Case ID matches the original's Incident ID. I'll have several Original with their subordinate case groupings in the end. Any advice would be greatly appreciated! Thanks!

Dave

Crystal 9.0, ARS 5.1.2, Remedy Helpdesk 5.0, SQL2K on Win2K Pro servers.
 
It sounds like you want something like:

if {Incident ID} = "Original" then
"Original"
else
if {IncidentID} = {CaseID} then
"Matched"
Else
"Others"

Hard to say though.

A good way to convey requirements is to provide example data and expected output.

The part I didn't understand was: "I'll have several Original with their subordinate case groupings in the end"

This sounds like you need groups, perhaps with some hierarchial self join.

-k
 
You're absolutely right, it is somewhat confusing...my apologies...Here's a sample:

CaseID IncidentID
A Original
B A
C A
D A
E A

CaseID is my unique field for that table. IncidentID is just a relationship field for cases that are connected together. So in my sample, Case A is designated as an original (or parent) and cases B-E are related to Case A (as children). That's why Case A's ticket number is listed in case's B-E's IncidentID field.
Anyway, I need to have groups where one parent is shown with all of it's children.

Thanks!
 
Add the table in a second time and join the CASE to the INCIDENT.

Group by the first tables CASE and you should be done.

-k
 
Looks like an alias of the table would work nicely here

1. Click Database -> Add DataBase to Report and add the table again. You will be prompted that it is a duplicate and if you want to add an alias to this table. Say yes. Use the alias name (Table_1) on the next screen or accept the name assigned.

2. Link the Case_ID from table to Incident_ID in table_1

3. In your record selection,

{Table.Incident_ID} = "Original"

Now you have all the incidents that belong to a Case ID
 
Forgot some steps

4. Group by {table.case_id}

5. With Table_1.Case_ID in the detail, you will have

GH CASE_ID = A

Detail B
C
D
E
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top