Solved

VB.NET WINFORMS Report Viewer

Posted on 2009-04-09
7
467 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

740 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