Thanks Milan.
This is what I came up with and it seems to work.
I added a reportviewer to asp.net with visible=false.
In rdlc I added a Dataset named DataSet1 same name as my dataset in my code.
In rdlc I binded the dataset created there to a table in sql and dragged a table to the report body and added the fields from the db table.
When running the report it seems to get the values from my code and not from the internal dataset. This is perfect.
Did I do it correctly?
Private Sub all() Dim ds As DataSet = New DataSet() Dim dt As DataTable = New DataTable() dt.Columns.Add("playerid") dt.Columns.Add("playername") dt.Rows.Add("1", "dog") dt.Rows.Add("2", "cat") dt.Rows.Add("3", "bird") dt.Rows.Add("4", "lion") ds.Tables.Add(dt) ReportViewer1.Reset() ReportViewer1.LocalReport.ReportPath = "reports\report1.rdlc" Dim rs As ReportDataSource = New ReportDataSource() rs.Name = "DataSet1" rs.Value = ds.Tables(0) ReportViewer1.LocalReport.DataSources.Add(rs) Dim warnings As Warning() = Nothing Dim streamids As String() = Nothing Dim mimeType As String = Nothing Dim encoding As String = Nothing Dim extension As String = Nothing ' Setup the report viewer object and get the array of bytes ReportViewer1.ProcessingMode = ProcessingMode.Local 'viewer.LocalReport.DataSources.Add(rds) Dim bytes As Byte() = ReportViewer1.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids, _ warnings) Dim Filename As String = "reportpdf" ''save file immediately without opening 'hide reportviewer if you don't want user to see it Dim fs As FileStream = System.IO.File.Create("c:\avital\" & Filename & ".pdf") fs.Write(bytes, 0, bytes.Length) fs.Close() End Sub