Click here to Skip to main content
15,943,103 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i created a report and trying to load it to a reportviewer manually but not able to get it loaded . my code

VB
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  ReportViewer1.Reset()
    Dim ReportDataSource1 As Microsoft.Reporting.WinForms.ReportDataSource = New Microsoft.Reporting.WinForms.ReportDataSource
    ReportDataSource1.Name = "InvoiceData_DataTable1"
    ReportDataSource1.Value = New InvoiceDataTableAdapters.DataTable1TableAdapter().GetData("EBM267")
    Me.ReportViewer1.LocalReport.DataSources.Clear()
    Me.ReportViewer1.LocalReport.DataSources.Add(ReportDataSource1)
    ReportViewer1.LocalReport.ReportEmbeddedResource = "Billmanagement.report.rdlc"
    ReportViewer1.RefreshReport()
End Sub


my Dataset name is InvoiceData DataTable1 has a parameter billno which i am supplying for demo but not working please let me know why my report is not loading a blank report with error is comming "A datasource instance has not been supplied for the datasource DataSet1"
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900