Link to home
Start Free TrialLog in
Avatar of jppinto
jppintoFlag for Portugal

asked on

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

Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Check in the value definition at the table (of the report) if you don't have =First(field.value)
Avatar of jppinto

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jppinto

ASKER

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