Using the ReportViewer Tasks Smart Tags Panel

The ReportViewer Tasks smart tags panel is provided on the ReportViewer Web server control and Windows Forms control so that you can do the following:

  • Choose an existing client or server report to use with the control.

  • Design a new report.

  • Choose data sources and update data source bindings. Choosing and updating data sources are necessary if you modify the datasets or reports after bindings have been created. For more information, see Updating and Rebinding Data Source References.

The ReportViewer Tasks smart tags panel is context-sensitive. Tasks vary depending on the control type and whether you are using a server or client-side report. If you are using the Windows Forms control, a Dock in parent container task is also provided.

To access the ReportViewer Tasks smart tags panel, drag a ReportViewer control from the Reporting section of the toolbox onto a Windows form or Web form, and then click the smart-tag glyph at the top right corner of the control.

ReportViewer Tasks Summary

The following table describes all of the tasks that you can choose.



Choose Report

Select an existing .rdlc file from the project or choose Server Report to select a published report on a report server. You can only choose one file for each instance of the control.

When you select a report, code is automatically generated that instantiates the project data source and binds the data source to the control. Information about the datasets that are used by the report is embedded in the report definition. If you subsequently modify the data source or update the report to use a different data source, you must update the data binding code. You can use the tasks on the ReportViewer Tasks smart tag panel to generate the updated code.

Choose Data source

(Local report only) Select an existing data source in the project that provides a dataset to the report. You can use this task to update the control to use new datasets.

Rebind Data sources

(Local report only) Update the data bindings for the control if the dataset or report has been modified.

Report Server Url

(Server report only) Specify the URL to a report server.

Report Path

(Server report only) Specify the name and location of the report. The report path includes virtual folders in the report server namespace that are used to address reports stored on a report server. You cannot include URL access parameters in the folder path. When referencing a report on a report server in native mode, the report path starts with a forward slash ( / ); when referencing a report on a report server in SharePoint integrated mode, the report path is a fully qualified URL. For example:

Native mode: /Adventureworks 2008 Sample Reports/Company Sales 2008

SharePoint integrated mode: http://MyServer/sites/MySite/MyLibrary/Adventureworks 2008 Sample Reports/Company Sales 2008.rdl

Design a new report

Open a new, blank report template in graphical design mode, and add a report (.rdlc) item to the project. You can only create client report definition (.rdlc) files. To create a server report, you must use Report Designer in SQL Server Reporting Services.

Dock in parent container

(Windows Forms control only) Expand the control to use all of the available space in the form.

Undock in parent container

(Windows Forms control only) Click this task to reduce the size of the control.

See Also


Adding and Configuring the ReportViewer Controls

Creating Client Report Definition (.rdlc) Files

Other Resources

Samples and Walkthroughs