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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal 2008 - Grouping by a Sumarized Feild

Status
Not open for further replies.

progenysend

Technical User
Feb 15, 2008
41
US
I've got several detail levels that give a single result at a group level. I need to group by the Header output while keeping the rest of the list intact.

Group 1 TARIUST
Detail TARIUST
Detail ALEXKA
Detail MBOND
Detail BROSS
Detail CLIFFD
 
If you place a detail field in a group header, it will always show you the result of the first record in the detail section. So what field are you grouping on and what field are you displaying in the detail section?

-LB
 
PS. You didn't explain your reference to a "summarized" field. What is the summary in the sample you showed?

-LB
 
I'm suppressing the detail section, but I'm using grouping and sorting to get the record I need to show in the header.

My first grouping is by an account number with a user field shown. Now I want all the same users to be together, but I need to keep the details in the right order to get the right user to display in the header.
 
You need to provide more information. What is the "right" user to display in the header? In what way did you group and sort to achieve this?

What do you mean by wanting all the same users together? Are you saying that different account numbers can have the same user and you want them together?

-LB
 
The "right" user is whoever I determine it to be. What I've got here is several linked tables that turned a unique identifier, like an incident number, into a list of actions and activities. It's an audit trail. I need to find the first person assigned to it and the first person that took an action, which aren't the same. The list of users are all the people that touched the incident. I group by team and action to get the right people to the top of the list to display in Group Header 1, which is a grouping of the incident number so all the details just show the incident once.

I want to group by who this was assigned to, or who took the activity. It doesn't matter which, but there is a list of names that needs to stay in that order to get the right people displayed in the end. I want to see that this guy was assigned all these incidents.
 
Cannot help unless you can explain who the "right" user is based on the data. You mention that a "first" person assigned and a first person that took an action. How do you know who is "first"? Is there a date field? A number that displays sequentially? This is the info we need. Once we know that someone can help.

-LB
 
Yes, there are several date fields. There is a date and time stamp associated to every incident creation and activity placed on it.
 
The following assumes that the "right user" is the one that appears on the earliest datetime record per incident number.

Create a SQL expression {%mindate} something like this:

(
select min(`datetime`)
from table A
where A.`incidentno` = table.`incidentno`
)

The punctuation will be specific to your datasource.

Then create a formula like this {@rightuser}:

if {table.datetime} = {%mindate} then
{table.user}

Place this in the detail section (and suppress it) and right click on it and insert a maximum on it at the incident group level. Then go to report->group sort-> and select "maximum of {@rightuser} as your group sort field. This will arrange the incidents together that have the same user, but will not affect the ordering within the group #1.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top