Export (0) Print
Expand All

Creating Client Report Definition (.rdlc) Files

The ReportViewer control supports a local processing mode that allows you to run client report definition (.rdlc) files using the built-in processing capability of the control. The client reports that you run in local processing mode can be easily created in your application project. There are four approaches to creating the report:

  • Create a new client report definition (.rdlc) file using the Report Wizard.

  • Create a new client report definition (.rdlc) file in Visual Studio.

  • Generate a report definition programmatically.

To add a new report to a project

  1. In the Project or Web Site menu, select Add New Item.

  2. In the Add New Item dialog box, in the Installed Templates pane, select Visual Basic or Visual C#.

  3. In the Templates pane, select Report or Report Wizard.

    If you select Report, a blank .rdlc file is added to the project. For more information on how to design reports in Report Designer, see Reporting Services Reports in SQL Server Books Online.

    If you select Report Wizard, the Report Wizard is started to guide you through the steps in creating a report. For more information on the Report Wizard, see Creating Client Report Definitions Using the Visual Studio Report Wizard.

To display the report in a ReportViewer control in your application

  1. In Microsoft Visual Studio, open the application project or Web site.

  2. Select the form or page that will contain the control.

  3. In graphical design mode, add a ReportViewer control to the Web page or form. The ReportViewer control is in the Data section of the Toolbox. For more information, see Adding and Configuring the ReportViewer Controls.

  4. Size and position the control on the page or form.

  5. In the ReportViewer Tasks Smart tags panel, select an existing client report definition (.rdlc) file in the Choose Report drop-down list, or click Design a new report to create a new report using the Report Wizard. For more information about opening the Smart tags panel, see Using the ReportViewer Tasks Smart Tags Panel.

  6. To preview the report, build or deploy the application.

    You can only preview a report by running it in a ReportViewer control. Note that you can open and edit the report definition at any time, and then build or deploy the application to check the results.

See Also



Copyright © 2012 by Microsoft Corporation. All rights reserved.


Build Date:

2012-08-02
Show:
© 2014 Microsoft