Author |
Message |
Yuval
Newbie
Joined: 21 Apr 2011
Location: Israel
Online Status: Offline
Posts: 6
|
Topic: Duplicate Records on Detail section Posted: 21 Apr 2011 at 3:49am |
Hi
I'm having some simple but annoying problem
The detail section shows me duplicate records
My Query returns 3 records (i'm using command) like
A 1 2
A 3 4
B 5 6
The grouping is done by the first field ('A' or 'B')
In the detail section there is:
GH A
A 1 2
A 1 2
A 3 4
A 3 4
GH B
B 5 6
B 5 6
Can somebody explain how to fix this issue ?
Thanks
Yuval.
|
IP Logged |
|
zach18
Groupie
Joined: 08 Feb 2011
Online Status: Offline
Posts: 46
|
Posted: 21 Apr 2011 at 4:51am |
in CR 2008, you can go to the database tab on the top and select the option "select distinct records"
|
Using Crystal Report 2008
www.zachtech.us
|
IP Logged |
|
Yuval
Newbie
Joined: 21 Apr 2011
Location: Israel
Online Status: Offline
Posts: 6
|
Posted: 21 Apr 2011 at 5:39am |
Thanks
I didn't find this option "select distinct records"
I'm using Crystal Report Designer 2008 version 12.0.0.683
There is another option to control this ?
|
IP Logged |
|
Yuval
Newbie
Joined: 21 Apr 2011
Location: Israel
Online Status: Offline
Posts: 6
|
Posted: 21 Apr 2011 at 5:57am |
Hi Again
I found the "select distinct records" , and it was checked already
So it didn't solve the problem
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|
Posted: 21 Apr 2011 at 6:47am |
Try adding another group on your second field, putting your data in the group header for that section and suppressing your details.
You're seeing duplicate data due to joins to multiple tables and somewhere in that there is more than one record which is causing your duplicates.
-Dell
|
|
IP Logged |
|
Yuval
Newbie
Joined: 21 Apr 2011
Location: Israel
Online Status: Offline
Posts: 6
|
Posted: 21 Apr 2011 at 7:50am |
I've added another group and still the detail section shows me duplicate data
How can i check my scripts ? i run my script on some sql tool and he doesn't return me duplicate records
Can it be connected to the link of the commands?
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|
Posted: 21 Apr 2011 at 7:58am |
Put the data in the group header, NOT the details! Suppress the details.
-Dell
|
|
IP Logged |
|
Yuval
Newbie
Joined: 21 Apr 2011
Location: Israel
Online Status: Offline
Posts: 6
|
Posted: 24 Apr 2011 at 1:27am |
Thanks a lot!
it works
i still didn't find out why i have duplicate records in the details section in the first place
|
IP Logged |
|
Yuval
Newbie
Joined: 21 Apr 2011
Location: Israel
Online Status: Offline
Posts: 6
|
Posted: 24 Apr 2011 at 7:31pm |
Well , Another small issue that i couldn't resolve
I need to summarize one of the field in the details section ( now in the GH)
Do you idea how to do that ?(when i summarize the detail field it duplicate the result)
Thanks
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|
Posted: 25 Apr 2011 at 5:37am |
Create a formula something like this:
If PreviousIsNull({table.groupfield}) or {table.groupfield} <> Previous({table.groupfield}) the 1 else 0
You can sum this field to get a distinct count. If you need to sum a field, replace the "1" with the field name.
-Dell
|
|
IP Logged |
|
|