on 08-03-2012 5:35 PM
Hello,
I have a very simple scenario.
In table 1 I have records displaying account numbers and the dates in which these accounts were contacted. There are multiple records for the same account number as there must of been multiple contacts.
Acct1 7-25-2012
Acct1 7-26-2012
Acct2 ....... and so on
In table 2 I have data related to the sales lines for the whole month of July.
With my current selection the sales lines records are doubled or tripled etc. based on the number of times the same record exists in table 1.
How do I refine the selection criteria to look at the table 1 and display records from table 2 only once?
Both tables are joined by the Account# field.
Any help would be greatly appreciated!
Hi Jack,
You can follow the steps provided below:
1.Open the report in Crystal Reports designer
2.Click on Report >> Section Expert. It opens the Section Expert in a new window
3. Select Details section on left hand side
4. On right hand side there is 'Suppress(no drill-down)' option on Common tab. Click on [X+2] button in front of it. Formula Editor opens
Write below formula
Previous ({database.field}) = {database.field}
5. Click on 'Save & Close' button to close the formula editor
6. Now duplicate rows are not visible in the report
You can also follow this SAP Note:
1479281 - How to remove duplicate rows from Crystal Reports?
Hope this helps!!
- Kuldeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just adding to my above post Jack, I also found these forum posts.
http://scn.sap.com/thread/1736901
http://scn.sap.com/thread/1935668
- Kuldeep
Hi Jack,
As table1.acctnmbr and table2.acctnbr are linked/joined with each other so i thing you can take any of the field.
I guess instead of doing
Previous ({database.field}) = {database.field}
what you can do for sales with different order is
Previous ({database.field}) = {order} and Previous ({database.field}) = {Sales field}
- Kuldeep
Jack,
This formula:
Previous ({database.field}) = {database.field}
The database field will be the field that is getting repeated like the "Date Field" is getting repeated as we can see in your example. so your formula should be like
Previous ("Date field") = {"Date field"} and Previous ({"order field"}) = {"order field"}
So this formula will ensure that the record set will be suppressed only if we have different same order number and same date.
Now let say if we have multiple orders for same date then it will be shown.
Hope now it make sense .
- Kuldeep
No no, check the example below, there are multiple order lines to one order but they're getting duplicated. They're getting duplicated because the account number in table 1 (R02-169) is listed multiple times and that's what's feeding data from table 2. If I manually remove multiple entries of R02-169 from table 1, the doubling doesn't happen, but I don't want to do this, I'd like to keep all entries in table 1.
R02-169 <---- Group Heading
R02-169 | R02-169 | 929461 | 07/27/2012 | 07/27/2012 | PKX21000351 | 1 |
R02-169 | R02-169 | 929461 | 07/27/2012 | 07/27/2012 | PKX301T0373 | 1 |
R02-169 | R02-169 | 929461 | 07/27/2012 | 07/27/2012 | RGR50023020 | 4 |
R02-169 | R02-169 | 929461 | 07/27/2012 | 07/27/2012 | RGR75023020 | 2 |
R02-169 | R02-169 | 929461 | 07/27/2012 | 07/18/2012 | PKX21000351 | 1 |
R02-169 | R02-169 | 929461 | 07/27/2012 | 07/18/2012 | PKX301T0373 | 1 |
R02-169 | R02-169 | 929461 | 07/27/2012 | 07/18/2012 | RGR50023020 | 4 |
R02-169 | R02-169 | 929461 | 07/27/2012 | 07/18/2012 | RGR75023020 | 2 |
Please use this link instead.
Hi,
Start by creating a group on the fields. That is one way to do this.
- Abhilash
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.