RDLC Report in report viewer

  • Thread starter Thread starter Bansor
  • Start date Start date
B

Bansor

Guest
I am tyrying to prodce RDLC report in Report viewer using dataset2 which I have
created and created a Datatable by executing a SQL Query.

I have copied the code below.
The problem with this is it doesn't give any error but when
I execute this code it doesn't populate the report with data which is
store in Datatable.


Step 1 : Fire SQl query to retrieve required data
-------------------------------------------------


itemdatatable = LoadCustomerRecordsUsingDataTable()
'Debug.Print
'ItemDataTable.Columns.Item(0).DefaultValue

intItemNo = itemdatatable.Rows.Count
MsgBox(intItemNo)


Step 2 : Populate report with "itemdatatable" retrieve above
------------------------------------------------------------


With Me.ReportViewer1.LocalReport
.DataSources.Clear()
.ReportPath = "C:\Users\Rajesh\My Documents\Visual Studio 2010\Projects\Project2\Project2\report1.rdlc"
.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("DataSet2", itemdatatable))
Me.ReportViewer1.RefreshReport()
End With

Continue reading...
 
Back
Top