ComponentOne ReportViewer for ASP.NET AJAX: ComponentOne ReportViewer for ASP.NET AJAX Overview > Adding the ReportViewer for ASP.NET AJAX Component to a Project

Adding the ReportViewer for ASP.NET AJAX Component to a Project

When you install ComponentOne Studio for ASP.NET AJAX, the Create a ComponentOne Visual Studio Toolbox Tab check box is checked, by default, in the installation wizard. When you open Visual Studio, you will notice a ComponentOne Studio for ASP.NET AJAX Projects tab containing the ComponentOne controls that have automatically been added to the Toolbox.

If you decide to uncheck the Create a ComponentOne Visual Studio Toolbox Tab check box during installation, you can manually add ComponentOne controls to the Toolbox at a later time.

Manually Adding the Studio for ASP.NET AJAX controls to the Toolbox

When you install ComponentOne ReportViewer for ASP.NET AJAX, the following ComponentOne ReportViewer for ASP.NET AJAX component will appear in the Visual Studio Toolbox customization dialog box:

      C1ReportViewer

To manually add the Studio for ASP.NET AJAX controls to the Visual Studio Toolbox:

1.   Open the Visual Studio IDE (Microsoft Development Environment). Make sure the Toolbox is visible (select Toolbox in the View menu if necessary) and right-click it to open the context menu.

2.   To make the Studio for ASP.NET AJAX components appear on their own tab in the Toolbox, select Add Tab from the context menu and type in the tab name, Studio for ASP.NET AJAX, for example.

3.   Right-click the tab where the component is to appear and select Choose Items from the context menu.

The Choose Toolbox Items dialog box opens.

4.   In the dialog box, select the .NET Framework Components tab. Sort the list by Namespace (click the Namespace column header) and check the check boxes for all components belonging to namespace C1.Web.UI.Controls.C1Report.2.dll. Note that there may be more than one component for each namespace.

5.   Click OK to close the dialog box.

The controls are added to the Visual Studio Toolbox.

Adding Studio for ASP.NET AJAX Controls to the Form

To add Studio for ASP.NET controls to a form:

1.   Add them to the Visual Studio Toolbox.

2.   Double-click each control or drag it onto your form.

Note: ReportViewer for ASP.NET AJAX requires Microsoft ASP.NET AJAX Extensions installed and a ScriptManager on the page before the C1ReportViewer control is placed on the page. You must create an ASP.NET AJAX-Enabled Project so that the ScriptManager and Microsoft AJAX Extensions are included on the page. For more information, see Creating an AJAX-Enabled ASP.NET Project. For more information about Microsoft ASP.NET AJAX Extensions, see http://ajax.asp.net/. For information about the ScriptManager, see MSDN.

Adding a Reference to the Assembly

To add a reference to the C1.Web.UI.Controls.C1Report.2 assembly:

1.   Select the Add Reference option from the Website menu of your Web Site project or from the Project menu of your Web Application project.

2.   Select the most recent version of the ComponentOne Studio for ASP.NET AJAX assembly from the list on the NET tab or browse to find the C1.Web.UI.Controls.C1Report.2.dll file and click OK.

3.   Select the Form1.vb tab or go to View|Code to open the Code Editor. At the top of the file, add the following Imports directive (using in C#):

Imports C1.Web.UI.Controls.C1Report

Note: This makes the objects defined in the C1.Web.UI.Controls.C1Report.2 assembly visible to the project. See Namespaces for more information.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.