Solved

How to use the ReportDataSource in a report viewer control

Posted on 2014-09-17
1
519 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

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!

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

695 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