cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove duplicate records from sap crystal report 2011

Former Member
0 Kudos

Hi,

I am using the Crystal Reports 2011, Here I am building the report by using the SAP tables like MSEG ,VBRP etc from  MSEG table i am getting  two row in which both the row have same material number(MATNR) and also i have made inner join with VBRP table  Now point is that when i select material number from

VBRP. In table it show 13 records but in report it show 26 records .HOW TO REMOVED  THESE DUPLICATE RECORD FROM MY REPORT.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Anidhya,

May be there is a problem with your query i.e cartesian effect . Pls cross check your query once.

Former Member
0 Kudos

Hello.  I am having trouble in getting either the table links set up correctly, or filtering out duplicate record sets that are being reporting in the details section of my report. It appears that I have 26 records being displayed, actually what happening is that

In mseg table two records is showing with having material number (matnr)  same in database table

now i have join this matnr filed with vbrp table 

because of 2 same records in mseg tabel it showing 26 records in crystal report whenever i selecting any filed from vbrp table as vbrp contain 13 records in database table so that materila number (matnr)

I think this is due to the other table links for my parameter values. But, I need to keep the links the way they are for other aspects of the report (header information). The tables in question are using an Inner Join, Enforced Both, =. I tried the other link options, with no luck.

Any ideas would be greatly appreciated.

DellSC
Active Contributor
0 Kudos

You have a couple of options:

1.  Try going to the Database menu and turning on "Select Distinct Records". Depending on which fields you are selecting, this may or may not work.

2.  Group on some field in the vbrp table.  Put all of your data in either a group header or footer section and suppress the details section.

-Dell

Former Member
0 Kudos

Hello

I have selected  4 field  2 from vbrp table i.e material number  and vbeln   and 2 from mseg table i.e

mblnr  and vendor  and   make a group on all 4 field and put in header section  without suppresing detail section   now problem is that after creating a group it effect the mseg table field i.e mblnr and vendor because if  i suppress the details section  some data get hide as i show in print screen the value 5000000788  of mblnr and for vendor 0000300196 get  hide

So how to resolve this issue

Any idea will greatly appreciated

thank you

Former Member
0 Kudos

Hi Anidhya,

It is clear that the problem is due to the format of data contained withthin the tables and their relationship.

This needs to be tested at back-end i.e SAP ECC to see whether a particular combination of joins is fetching the required output.

A "group" at Crystal-end implies a "Group By" clause in the inferred SQL,a "Distinct Records" checkbox at Crystal-end implies a "Select Distinct(Table_Field)" at the backend and a left outer or a inner join in the Crystal's "Links" tab implies similar join in the inferred SQL.

Most probably, you would require a combination of left/right outer join along with an inner join to get the desired output. And this could be better tested at the ECC end.

Thanks

Prathamesh

abhilash_kumar
Active Contributor
0 Kudos

Hi Anidhya,

Move everything from the Group Header 1 to the Group Footer 4. Suppress the details section and all other Group Headers and Footers except Group Footer 4.

Let me know if that helps!

-Abhilash

Former Member
0 Kudos

Hi,

The line spacing issue can be resolved by deleting the details.  However, make sure to copy and paste the detail headers before deleting the details.  When deleting the fields in details section, the detail headers are deleted as well.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Anidhya,

                You can go in File menu-Report Option-Check the Check Box(Select Distinct Record)..I think this will solve your problem.

Thanks,

Arvind Kumar Singh

Former Member
0 Kudos

You can achieve using this..

abhilash_kumar
Active Contributor
0 Kudos

Hi Anidhya,

Create a group on the Material Number field and suppress the details section.

- Abhilash

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

hiii Abhilash

Thnxx for reply

I have done exactly what u said but  now material  number (MATNR)  from VBRP showing only 1 records  which is to be 13  records  and i am also selecting VBELN  from  VBRP  table which is  showing 26 records

Former Member
0 Kudos

hiii  Abhilash

i m sending print screen what i am  getting

abhilash_kumar
Active Contributor
0 Kudos

Hi Anidhya,

You would also need to create a group on "vbein".

Then, suppress the details section and move the Group Header #1 field to Group Header #2.

- Abhilash

Former Member
0 Kudos

Hi Anidhya

To remove duplicate records right click field - format object - check the suppress if duplicated , but this is not a correct way to apply in detail section .

May be there is a problem with your joining query . to cross check your query  Right click on Database filed - show SQL Query , and check in your DB.....

Former Member
0 Kudos

hiii abhilash

Your suggestion is well working out for only if i select the field of same table i.e  in previous  print screen  material number (MBLNR)  and VBELN  is coming from same table VBRP.

but if i select  MBLNR  field  or any another field  from  MSEG TABLE   then  again duplicate data occur now how to remove these effect .

Former Member
0 Kudos

I have checked and no error found but still i m not getting a correct result may be i fall in cartesian effect