Microsoft Reporting Services - report showing only first record

I've a Dataset (DataSet_qryDadosCarros) that has an SQL View as data source (qryDadosCarros). I use the code below to bound the data to a report. The report opens correctly but shows only the first record. If I open the Dataset and preview the data, it shows all of the records, only on the report shows only the first.

What I'm I missing here?

Thanks for your help,

jppinto
Public Class frmReportViewer

    Private Sub frmReportViewer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


        With Me.ReportViewer1.LocalReport
            .ReportPath = Application.StartupPath & "\..\..\Reports\rpt_DQAsubCarros.rdlc"
            .DataSources.Clear()
        End With

        SQL = "SELECT * FROM qryDadosCarros"
        Using da As New SqlDataAdapter(SQL, myConnectionString)

            Using ds As New DataSet
                da.Fill(ds, "qryDadosCarros")
                Dim rptDataSource As New ReportDataSource("DataSet_qryDadosCarros", ds.Tables("qryDadosCarros"))
                Me.ReportViewer1.LocalReport.DataSources.Add(rptDataSource)
            End Using

        End Using
        Me.ReportViewer1.RefreshReport()
    End Sub
End Class

Open in new window

LVL 33
jppintoAsked:
Who is Participating?
 
Jorge PaulinoConnect With a Mentor IT Pro/DeveloperCommented:
And do you have the fields in the "Details" row? Check if you don't have them in the Row Header.
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
Check in the value definition at the table (of the report) if you don't have =First(field.value)
0
 
jppintoAuthor Commented:
Hello jpaulino,

I've checked and I don't have "First" on the table. I will follow up on this only tomorrow. Thanks for your comment...

jppinto
0
 
jppintoAuthor Commented:
That's it! This is the first time that I'm using Reporting Services and I don't know how the table works. I had the fields on the Row Header! I've move them to the Details part of the table and it's working fine now!

Thanks.

jppinto
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.