none
WinForms Report View and Report (rldc) - Able to Set my custom dataset but only getting the first record RRS feed

  • Question

  • I am trying out WinForms Report viewer using an embedded report (rldc) in a Windows Application

    I have created a dummy dataset based on a SQL View, and built the report using those fields. 

    When I run the application, I populate a dataset and assign it to the Report.  However, the report only shows the first record.  I've examined the dataset at each point along the way and the three records I'm sending are there.  But when the report displays, only one shows. 

    First time I'm using the Report Viewer, I usually use a Crystal report.

    Here is my code.

      Public Sub New(ds As DataSet)
            InitializeComponent()
            dsLocal = ds
      End Sub
     
        Private Sub rvBinLabel_Load(sender As System.Object, e As System.EventArgsHandles MyBase.Load
     
            Dim rptDataSource As New ReportDataSource
            With rptDataSource
                .Name = "dsBinLabels"
                .Value = dsLocal.Tables(0)
            End With
     
            With mrvBinLabel
                .Reset()
                .ProcessingMode = ProcessingMode.Local
                With .LocalReport
                    .ReportEmbeddedResource = "MoldLabelApp.rptBinLabel.rdlc"
                    .DataSources.Clear()
                    .DataSources.Add(rptDataSource)
                    .Refresh()
                End With
                .Refresh()
                .RefreshReport()
            End With
     
        End Sub

     


    Tim Conway

    • Moved by Carl Cai Monday, February 9, 2015 1:55 AM more related
    Friday, February 6, 2015 6:01 PM

All replies

  • I am trying out WinForms Report viewer using an embedded report (rldc) in a Windows Application

    I have created a dummy dataset based on a SQL View, and built the report using those fields. 

    When I run the application, I populate a dataset and assign it to the Report.  However, the report only shows the first record.  I've examined the dataset at each point along the way and the three records I'm sending are there.  But when the report displays, only one shows. 

    First time I'm using the Report Viewer, I usually use a Crystal report.

    Here is my code.

      Public Sub New(ds As DataSet)
            InitializeComponent()
            dsLocal = ds
      End Sub
     
        Private Sub rvBinLabel_Load(sender As System.Object, e As System.EventArgsHandles MyBase.Load
     
            Dim rptDataSource As New ReportDataSource
            With rptDataSource
                .Name = "dsBinLabels"
                .Value = dsLocal.Tables(0)
            End With
     
            With mrvBinLabel
                .Reset()
                .ProcessingMode = ProcessingMode.Local
                With .LocalReport
                    .ReportEmbeddedResource = "MoldLabelApp.rptBinLabel.rdlc"
                    .DataSources.Clear()
                    .DataSources.Add(rptDataSource)
                    .Refresh()
                End With
                .Refresh()
                .RefreshReport()
            End With
     
        End Sub

     


    Tim Conway

    Hello,

    Since this issue is mainly related to  Report viewer, I will help you move this thread to the following forum which is to discuss reporting functionality including the integrated report designer and viewer controls for adding rich data reports to Windows Forms and ASP.NET applications.

    Other Forums Visual Studio Report Controls

    Regards,

    Carl


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, February 9, 2015 1:57 AM