Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to change data source for an existing report?

Posted on 2011-03-22
2
Medium Priority
?
1,724 Views
Last Modified: 2012-08-14
Hi,

I have copied reports from one SSRS server to another server. Now, the reports need to use a different shared data source. The shared data source is already created, but know of the reports are using it. How can I change the data source for the reports within MS Visual Studio 2008?

Thanks
0
Comment
Question by:gtrapp
[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
  • 2
2 Comments
 
LVL 19

Assisted Solution

by:Raheman M. Abdul
Raheman M. Abdul earned 2000 total points
ID: 35193336
First we need to change the security settings for connecting to the data source. In the report page, click on Properties > Data Sources. Change the “Connect using” to “Credentials stored securely in the report server” and specify an account that has access to the data. Also check “Use as Windows credentials…”.

Source:
http://alexduggleby.com/2008/07/18/sql-server-reporting-services-2008-tutorial-in-5-minutes-or-how-to-send-my-boss-a-report-from-a-view-quickly/
0
 
LVL 19

Accepted Solution

by:
Raheman M. Abdul earned 2000 total points
ID: 35193380
Updating Data Source References in a Report Definition

The report definition includes dataset elements that define the data source structure used by the report. The dataset elements are added to the report definition during report design. A new element is added each time you drag a specific field to a data region or text box in the report.

Updating the report definition is necessary if you are copying report definition files between projects that have different data sources or if you modified the datasets used in your project. If you subsequently modify the actual dataset in the project by removing or renaming fields or tables, the report definition will no longer contain valid references. To update the report definition, use the Data Sources dialog box as described in the following steps.
How to Update References in a Report Definition

   1.

      Open the client report definition (.rdlc) file in graphical design mode.
   2.

      From the Report menu, select Data Sources. The Report Data Sources dialog box appears. You can use the following options:
          *

            To add a new dataset to the report definition, select a Project data source and click Add to report. In most cases, this option is not necessary. Project data sources are added to the report definition automatically when you drag fields to the report layout.
          *

            To remove an existing dataset reference from the report definition, select the dataset and click Remove.
          *

            If you renamed a dataset in your project, you can use the Report Data Sources dialog box to update the dataset name in the report definition. Click the Rename button to set the dataset name in overwrite mode, and then type the new name.
   3.

      Click Refresh All to update the report definition file with your changes.

Rebinding Data Sources to the ReportViewer Control

The ReportViewer control requires data bindings to access application data sources at run time. Data bindings are created for the control when you select a client report definition (.rdlc) file.

Rebinding a data source is necessary if you modify a report definition that has already been bound to a control, if you modify the dataset after the control has been bound to a form or Web page, or if you add a new dataset to the report. All of these scenarios result in bindings that are out-of-date. Use the Rebind Data Sources task on the ReportViewer Tasks smart tags panel to update the data bindings in application code.
NoteNote

Not all modifications to a report definition require that you rebind a data source. Rearranging items, formatting items, or reusing the same data-bound field in multiple data regions are examples of modifications that do not invalidate existing data bindings. Similarly, if you modify a part of the data source that is not used in the report, you do not need to update the bindings.
How to Rebind Data Sources

   1.

      Open the form or Web page that contains the ReportViewer control.
   2.

      In the ReportViewer Tasks smart tags panel, click Rebind Data Sources. You can inspect the code behind the form or page to confirm the changes.

Choosing Data Sources for the ReportViewer Control

When you convert a server report definition (.rdl) file to a client report definition (.rdlc), you must ensure that your application includes data binding code for the ReportViewer control. The data binding code is generated automatically when you create a .rdlc file from a report template. However, the data binding code will be missing if you create the .rdlc file in some other way. To add the data binding code, use the Choose Data Sources task on the ReportViewer Tasks smart tags panel. To learn more about converting report definitions, see Converting RDL and RDLC Files.
How to Add Data Source Bindings

   1.

      Open the form or Web page that contains the ReportViewer control.
   2.

      In the ReportViewer Tasks smart tags panel, click Choose Data Sources. You can inspect the code behind the form or page to confirm the changes.

For more details refer : http://msdn.microsoft.com/en-us/library/ms252085%28v=vs.90%29.aspx
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction: This article is aimed at report developers who are used to developing reports using relational databases and have gotten a first-time assignment to develop reports on OLAP cubes. It demonstrates how to build a report using SQL Ser…
This code started out as a fix for a customer that had incoming data that was hunderds of numbers and words long that was to fit in one column. The problem was that the customer did not want to split words or numbers when wrapping in the column. …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

730 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