Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to change data source for an existing report?

Posted on 2011-03-22
2
Medium Priority
?
1,771 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
  • 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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

Steps to solve SSRS SQL 2008 R2 User Access Control (UAC) Permission Error With the introduction of SQL Server 2008 R2 and Vista (Windows 7 as well) came new enhanced security features. One of the features included was User Access Control (UAC) t…
A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Loops Section Overview

963 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