Solved

How to change data source for an existing report?

Posted on 2011-03-22
2
1,671 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 500 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 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Written by Valentino Vranken. Introduction: In a previous article (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Reporting-On-Data-From-Stored-Procedures-part-1.html) I announced that I would writ…
Hi, I have heard from my friends that it’s not possible to create Label Printing report using SSRS. I am amazed after hearing this words not possible in SSRS. I googled lot and found that it is possible to some of people know about the Report Bui…
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 …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

630 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