Solved

VB.NET WINFORMS Report Viewer

Posted on 2009-04-09
7
468 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

738 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