locked
Multi Select Parameter RRS feed

  • Question

  • User-797751191 posted

    Hi

      In main report i have Invoice Parameter . I have passed values V0001,V0005 in TextBox.  In Subreport in each order it shows all values of V0001,V00005 whereas in V0001 it should show only details of V0001 . In V0005 it should show details of V0005.

    In Main report Stored Procedure i have splitted comma separated values in different rows.

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Dim data As New ds_CO_NET.sp_CO_NETDataTable
            Dim a As New ds_CO_NETTableAdapters.sp_Invoice_NETTableAdapter
            a.Fill(data, TextBox1.Text)
            Dim rds As New Microsoft.Reporting.WinForms.ReportDataSource("DataSet1", CType(data, DataTable))
            ReportViewer1.LocalReport.DataSources.Clear()
            ReportViewer1.LocalReport.DataSources.Add(rds)
            ReportViewer1.LocalReport.ReportPath = "C:\Invoice.rdlc"
            Dim txtbx As New ReportParameter("InvoiceNo", TextBox1.Text)
            ReportViewer1.LocalReport.SetParameters(New ReportParameter() {txtbx})
            ReportViewer1.LocalReport.Refresh()
            AddHandler ReportViewer1.LocalReport.SubreportProcessing, AddressOf SetSubDataSource
            ReportViewer1.RefreshReport()
            
        End Sub
    
    
    Public Sub SetSubDataSource(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
            Dim data As New ds_Qty_Net.sp_qty_NetDataTable
            Dim a As New ds_Qty_NetTableAdapters.sp_Qty_NetTableAdapter
            a.Fill(data, TextBox1.Text)
            e.DataSources.Add(New ReportDataSource("DataSet1", CType(data, DataTable)))
        End Sub

    Thanks

    Saturday, January 18, 2020 9:11 AM

All replies

  • User288213138 posted

    Hi jsshivalic,

    In main report i have Invoice Parameter . I have passed values V0001,V0005 in TextBox.  In Subreport in each order it shows all values of V0001,V00005 whereas in V0001 it should show only details of V0001 . In V0005 it should show details of V0005.

    In Main report Stored Procedure i have splitted comma separated values in different rows.

    According to your description, I couldn’t understand your requirement clearly.

    What problems did you encounter and what were your requirement?

    And I didn't find you splitted comma separated values in different rows.

    So please post more details information about your requirement.

    Best regards,

    Sam

    Sunday, January 19, 2020 1:50 AM