Export (0) Print
Expand All
17 out of 23 rated this helpful - Rate this topic

Reporting Services and ReportViewer Controls in Visual Studio

New: 5 December 2005

The ReportViewer control is a Visual Studio data control that you can add to a Web page in an ASP.NET application project, or to a form in a Visual Basic Windows application. The control embeds report processing and viewing capabilities directly into your application. It also provides an integrated design environment so that you can build client report definitions (.rdlc) using data from any ADO.NET data object. A full-featured API provides programmatic access to the control and reports so that you can configure report functionality at run time.

Although the ReportViewer control is built on the same Microsoft reporting technology as Reporting Services, it is distributed as a data control in Visual Studio 2005. You can use the control with Reporting Services, or as an embedded data control that provides rich reporting functionality.

To learn more about the ReportViewer control, search for "ReportViewer Controls (Visual Studio)" in the Visual Studio product documentation.

The following table shows how the ReportViewer control and Reporting Services compare on report processing, data retrieval, deployment, and report design. You can use this information to determine which Microsoft reporting technology is the best choice for your application.

Functionality ReportViewer controls SQL Server Reporting Services

Report processing

Processes reports in the client application (local mode), or hosts server reports that run on a remote SQL Server Reporting Services report server (remote mode).

Processes reports on a report server, a middle-tier Web service that runs on Internet Information Services (IIS).

Report output formats

GDI for reports that run in Windows applications. HTML for reports that run in ASP.NET Web pages.

Export formats include Microsoft Excel and PDF.

HTML, MHTML, TIFF, PDF, Excel, CSV, and XML.

It is possible to write custom output formats.

Report features

Interactive and static reports for multidimensional, relational, and visual data.

You can define custom assemblies that run in the report.

You can use expressions to provide conditional formatting and aggregates.

Report features include all of those provided in reports that run in a ReportViewer control, plus support for custom report controls that you can create and run in a report.

Data source types and data retrieval

Client-side processing:

Bind directly to ADO.NET data tables and consume DataTable instances supplied to the control. You can also bind directly to business objects. Data processing is separate from report processing. The application provides a rowset to the report. The control merges the rowset into the report and renders it into an output format.

Server-side processing:

The report contains data from the supported data source types. Data processing and rendering is performed on the report server, and then the report is loaded into the ReportViewer control.

Integrated data and report processing on a report server and on remote data servers.

Data processing extensions on the report server determine supported data source types. Default data sources include SQL Server, Analysis Services, SQL Server Integration Services, Oracle, XML, and OLEDB.

Custom data processing extensions can be created to support other data source types.

Report parameterization

Client-side processing:

Built-in support for report parameters provides conditional formatting and filtering of the result set based on a static value.

If you want to accept user input for query parameters or report parameters at run time, you must write code in your application to support it.

In contrast with Reporting Services reports, a ReportViewer control that runs in local mode does not provide a parameter input area that you can use to pass values used during data processing. There is no integration between data and report processing in the ReportViewer controls in local mode.

Report parameters support conditional formatting and can be mapped to query parameters, providing a way to pass in report parameter values to a query at run time. A parameter input area is provided on the report by default. Parameter properties can be defined at design time and managed at run time.

Report design and Visual Studio integration

Create client report definition (.rdlc) files in Visual Studio. Adding a Report template to a project creates a report definition file, adds the file to your project, and opens an integrated report designer in the Visual Studio workspace.

The Visual Studio Data Source wizards can be used to provide data in your application for subsequent use in the report.

The Visual Studio Report Designer does not include a Preview tab. To preview your report, run the application and preview the report embedded in it.

The Visual Studio Report Designer integrates with the Data Sources window. When a user drags a field from the Data Sources window to the report, the Report Designer copies metadata about the data source into the report definition file. This metadata is used by the ReportViewer control to automatically generate data-binding code.

Create report definitions in Visual Studio through the Business Intelligence Development Studio. The Business Intelligence Development Studio adds project templates that are specific to SQL Server components. To create reports, choose from the Report Server Project or Report Server Project Wizard templates.

A Data tab, Layout tab, and Preview tab allow you to define data, create a report layout, and preview the report in the same workspace.

Deployment and distribution

Redistributable controls and .rdlc files can be included in your application. You can also pass in report definition as a stream.

ReportViewer hosts the report in a form or Web page in an application that you create and deploy.

The ReportViewer toolbar provides page navigation, print, search, and export formats to support run time operations.

Deploy a SQL Server Reporting Services report server. Report definitions are stored in a report server database, processed on a server, and viewed in a browser-based application or custom application.

A report toolbar provides page navigation, print, search, and export formats.

Viewing tools and SharePoint Web parts can be used to view reports on demand.

Distribution features include subscription-based report delivery to e-mail addresses and file share locations.

Internet access

A ReportViewer control hosted in a Web page is recommended if you want to make reports available in an Internet-facing Web application.

You can fit the control and reports into an existing Web application, using the security infrastructure that your application supports.

You can configure a Reporting Services report server for Internet access. Depending on application and user requirements, you might need to create a custom authentication extension, modify configuration files, and configure the server for Secure Sockets Layer (SSL). For more information, see Configuring a Report Server for Internet Access.

Enterprise features

None in the control. However, you can use the control with other applications that provide enterprise functionality.

ReportViewer controls are ideal for providing predefined reports that are embedded in Windows Forms applications and ASP.NET Web pages.

ReportViewer controls can host reports that are in a report server-scale out deployment (report server deployment is transparent to the control).

You can use the control in custom applications that run in any high availability deployment model.

Reporting Services supports these enterprise features:

  • Scale-out deployment.
  • Scheduled and on-demand report processing.
  • Ad hoc reports that can be created on demand for one-time use or saved to a server.
  • Data-driven subscriptions that route customized report output to a dynamic list of recipients.
  • Management and configuration tools.

Customization

Customization is supported through the API.

You can also set properties on reports and the ReportViewer toolbar to determine visibility and feature availability.

Extensions can be created to add support for data processing, report delivery, custom authentication, and report rendering.

You can set properties on the report, the report toolbar, and report server.

Additional customization is supported through an extensive API.

Samples and Walkthroughs

Search for "Samples and Walkthroughs in Visual Studio" in the Visual Studio product documentation.

For information about samples and walkthroughs in Reporting Services, see Reporting Services Tutorials.

Documentation

Search for "ReportViewer Controls (Visual Studio)" in the Visual Studio product documentation.

Reporting Services is documented in SQL Server 2005 Books Online. For more information, see SQL Server Reporting Services.

To view these topics on MSDN, see Samples and Walkthroughs in Visual Studio and ReportViewer Controls (Visual Studio).

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.