and links to how-tos are the best way to learn :
http://www.dotnetheaven.c
Hello Experts
My setup:
VS08
RS08/RS05 (have both)
asp.net/vb.net (webforms)
SQL08
I've got a reportviewer control on my aspx page. I'm trying to control the datasource used in a report depending on which user uses the page. To do this I added a web reference for the reporting services dll. I think. I tried connecting to my 2008 RS server but it couldn't find any dll's for me to reference. So I connect to the 2005 RS server via the directions on an msdn page and it works. I add a "reportingservices.wsdl" to my App_WebReferences. No errors in VS once I add the code to reference the datasources. However, once I load the aspx page in my browser I get the following error:
Compiler Error Message: BC30002: Type 'ReportingService' is not defined.
Source Error:
Line 35: ReportViewer1.ShowCredenti
Line 36: ReportViewer1.ServerReport
Line 37: Dim rs As New ReportingService
Line 38: rs.Credentials = System.Net.CredentialCache
Line 39: Dim reference As New DataSourceReference()
Source File: C:\inetpub\wwwroot\New\GM\
I've tried to do a lot of things but I'm sure this is a simple problem. I don't fully understand how to reference a dll properly or how to use the correct namespace/imports for it. Hopefully someone has some other ideas and not just post a link to gotreportviewer.com.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
and links to how-tos are the best way to learn :
http://www.dotnetheaven.c
Removing those two lines creates the same error:
Compiler Error Message: BC30002: Type 'DataSourceReference' is not defined.
Source Error:
Line 35: ReportViewer1.ShowCredenti
Line 36: ReportViewer1.ServerReport
Line 37: Dim reference As New DataSourceReference()
Line 38: reference.Reference = "/folder"
Line 39: Dim dataSources(1) As DataSource
Source File: C:\inetpub\wwwroot\New\GM\
I fixed this on my own. When adding the web reference for an RS2008 server you have to use "http://localhost/reportse
Now I just need to get the datasource to actually work. Based on your article I guess this has to be done with a parameter.
Business Accounts
Answer for Membership
by: shahprabalPosted on 2009-08-12 at 12:17:21ID: 25081850
you dont need these lines:
Line 37: Dim rs As New ReportingService .DefaultCr edentials
Line 38: rs.Credentials = System.Net.CredentialCache