Solved

VB.NET WINFORMS Report Viewer

Posted on 2009-04-09
7
457 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
  • 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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 seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now