?
Solved

How to use the ReportDataSource in a report viewer control

Posted on 2014-09-17
1
Medium Priority
?
544 Views
Last Modified: 2014-09-18
Hi I am using a reportviewer control in visual studio 2012 and I want to reset the datasource of the report viewer, but I can't figure out the right name value combination:
The Datasource in my .rdlc is "RF" and the Dataset in the .rdlc is "dsTotalOrderCalls"
I have an Objectdatasource ID:  "odsSales" and a type name:  "RapidFire.RFTableAdapters.USP_TOTAL_ORDERCALLSTableAdapter"
that is referring to a table adeapter in an .xsd (dataset) that is calling a stored procedure called "USP_TOTAL_ORDERCALLS"  and returning a data table called:  "USP_TOTAL_ORDERCALLSDataTable"

When I try to open a new instance of the reportdatasource ie,
rv_SalesSC.LocalReport.DataSources.Add(new ReportDataSource("dsTotalOrdersCalls", odsSalesSC));

I receive an error message saying:
Cannot create a connection to data source 'RF'

Can someone help me understand what values go into instantiating a new reportdatasource object?
Thank you!!!
0
Comment
Question by:Scarlett72
[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
1 Comment
 

Accepted Solution

by:
Scarlett72 earned 0 total points
ID: 40330624
my stored proc was producing an error based on the parameters I was sending it, I was able to instantiate the object using: rv_SalesSC.LocalReport.DataSources.Add(new ReportDataSource("dsTotalOrdersCalls", odsSalesSC)); which is the name of my .rdlc dataset and the ObjectDataSource ID value
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

765 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