Solved

VB.NET WINFORMS Report Viewer

Posted on 2009-04-09
7
469 Views
Last Modified: 2012-05-06
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

0
Comment
Question by:jimseiwert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 48

Expert Comment

by:jpaulino
ID: 24110831
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
 
LVL 2

Author Comment

by:jimseiwert
ID: 24110861
no datasource, right now it is all text on the report
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 24110885
Do you have any error message ?
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 2

Author Comment

by:jimseiwert
ID: 24110927
no
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 24111097
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
 
LVL 2

Author Comment

by:jimseiwert
ID: 24111130
That was it. Thank you
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 24111186
Glad I could help!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question