cancel
Showing results for 
Search instead for 
Did you mean: 

duplicates data at report preview

Former Member
0 Kudos

can any help me about dunplicate data fill to cr report view

i am using vb2015 and Support Pack 15 (v.13.0.15.1840)


when i filling data from dataset to cr it will dunlicate all data depends on row x10

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Save your data set to XML format and then have a look at the data, it likely is in the data.

You can also hide duplicate data.

Don

Former Member
0 Kudos

if i test in vb sql query it show me correctly but when fill in to cr ....

when fill to cr will be like this i had

i use vb code like this

Try

            Dim rpt As New DFESAFReport1() 'The report you created.

            Dim myConnection As OleDbConnection

            Dim MyCommand As New OleDbCommand()

            Dim myDA As New OleDbDataAdapter()

            Dim myDS As New DataSet 'The DataSet you created.

            myConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\21.09.15.mdb;Persist Security Info=True;Jet OLEDB:Database Password=dfsc1109")

            MyCommand.Connection = myConnection

            MyCommand.CommandText = "SELECT Services.VendorName,RepairCode,RepairDo,Product,Warranty,Qty,RepairDate,Address,PersonContact,Mobiles,Contact,Contact1,Fax,Email from Services,Vendor where Services.VendorName = Vendor.VendorName and RepairDo = '" & Me.Label1.Text & "' group by Services.VendorName,RepairCode,RepairDo,Product,Warranty,Qty,RepairDate,Address,PersonContact,Mobiles,Contact,Contact1,Fax,Email order by RepairDo"

            MyCommand.CommandType = CommandType.Text

            myDA.SelectCommand = MyCommand

            myDA.Fill(myDS, "Services")

            myDA.Fill(myDS, "Vendor")

            rpt.SetDataSource(myDS)

            CrystalReportViewer1.ReportSource = rpt

            myConnection.Close()

        Catch ex As Exception

            MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

        End Try

this is 2 tables if i use single table no this problem

0 Kudos

You have 2 tables so you need to set the linking otherwise it will return all values.

Don

Answers (0)