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

Eliminating Duplicate Records

Status
Not open for further replies.

safari7391

Programmer
Apr 29, 2003
33
US
Crystal Reports XI
Windows 2000 Pro
Access Database
ODBC connection

Also I have a Left Outer Join on the detail table and a summarized table of the detail table. The data captures call center data, but it is rolled up to the skill leave of each agent not as each individual call – detail table. The summarized table is rolled up to the agent level, the reason for this is to be able to sort by different field from a parameter.

I am having a problem with duplicate records in the detail section. These records are to show as a single record so I can be able to sort on them through a parameter.

How they are shown now - Example:

Group1
DetailUser1
DetailUser2
DetailUser3
DetailUser2
DetailUser4

As you can see the DetailUser2 is showing up twice.

How I would like them to look - Example:

Group1
DetailUser1
DetailUser3
DetailUser2
DetailUser4

I am using the following formula under the Section Expert in the Detail Suppress section to suppress the duplicates, but it’s not suppressing all of the duplicates.

not onfirstrecord and
{@Agent_Name} = previous({@Agent_Name})
 
First, I doubt that you have duplicates, what you are experiencing is row or record inflation.

Since you don't show what's in @agent_name, it's impossible to know what is happening there as well.

It appears that you simply need another grouping by the Detailuser field, but again, it's impossible to know.

I suggest that you post specifics, such as menjtioning the (roll up* to the agent level, is this the detail use? If njot, why not show what fields are involved in the database.

Obviously if you only have 1 group field (and just calloing it group instead of showing the field is again meaningless), you could just select Database->Select Distinct Records.

Example data should show ALL of the fields used, and the intended output should indicate what the result will be based on the example. This precludes the need to try to describe requirements as they are more clear.

-k
 
What is row or record inflation?

Here is the {@Agent_Name} formula.

if
(isnull({OrganizationChart.Agt_Name}))
then
"OTHER"
else
{OrganizationChart.Agt_Name}


Can not add a group at the {@Agent_Name} level, yes that would eliminate the duplications, but I need to sort on the fields in the report from a parameter. If I put a group in their on the {@Agent_Name} formul, then its first sort will be {@Agent_Name}. And I need it to sort by the parameter selection first.

Here is the formula and the fields in my report that I am sorting by.

{@Sort_1}
//Output 1st Sorting criteria
if count({?Sort Criteria}) >=1 then
(
select {?Sort Criteria}[1]
case "Calls Handled": {Daily_Metrics_Avg.Sum_acdcalls}
case "Average Calls Per Hour": {Daily_Metrics_Avg.Avg_Calls_Per_Hour}
case "Average Handled Time":{Daily_Metrics_Avg.Avg_Handled_Time}
case "Average Talk Time": {Daily_Metrics_Avg.Avg_Talk_Time}
case "Average Call Work Time": {Daily_Metrics_Avg.Avg_Call_Work_Time}
case "Total Hold Time": {Daily_Metrics_Avg.Sum_holdtime}
case "Aux Time":{Daily_Metrics_Avg.Sum_aux_time}
case "Aux Time %": {Daily_Metrics_Avg.Aux_Time_Percentage}
default: 0000
)

There are a total of 8 like these the only thing change is the number 1, to the next sort which is {@Sort_2} and the number change to 2

But I am not having the problem with the sort, only with the duplications.

The summarized table I mentioned is a rolled up of the detail table (which is a roll up from the individual call to the skill level of an agent) then rolled up to the agent level. And I need the agent level to sort on the summarized total.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top