VB.NET WINFORMS Report Viewer

I created a report report1.rdlc, how would i load this report using code into a microsoft report viewer.  I tried the below code but the report viewer does not display the report
Dim path As String = Application.StartupPath & "\labels\report1.rdlc"
frm_main.ReportViewer1.LocalReport.ReportPath =  path 
frm_main.ReportViewer1.ServerReport.Refresh()

Open in new window

LVL 2
jimseiwertAsked:
Who is Participating?
 
Jorge PaulinoConnect With a Mentor IT Pro/DeveloperCommented:
Then try this way and make sure that the path for the report1.rdlc is correct
Dim path As String = Application.StartupPath & "\labels\report1.rdlc"
frm_main.ReportViewer1.LocalReport.ReportPath =  path 
frm_main.ReportViewer1.RefreshReport()

Open in new window

0
 
Jorge PaulinoIT Pro/DeveloperCommented:
What your report have ? You should indicate the datasource ... don't you have one?
 
frm_main.ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("TableName", ds.Tables(0)))
0
 
jimseiwertAuthor Commented:
no datasource, right now it is all text on the report
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
Jorge PaulinoIT Pro/DeveloperCommented:
Do you have any error message ?
0
 
jimseiwertAuthor Commented:
no
0
 
jimseiwertAuthor Commented:
That was it. Thank you
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
Glad I could help!
0
All Courses

From novice to tech pro — start learning today.