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
Solved

VB.NET WINFORMS Report Viewer

Posted on 2009-04-09
7
466 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 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