ActiveReports 11 Server User Guide
Use the Designer Web Control
ActiveReports 11 Server User Guide > How To > Use the Designer Web Control

The Web controls need to be directed to the server used for ActiveReports 11 Server in order to function. In your production application, specify the user name and password based on the current user and store information in the current session to persist these values.

To add the Designer control to a Web Form

  1. In Visual Studio, create a new C# ASP.NET Web Site.

    If you need to add the control to your toolbox, drop down these steps.

    1. Right-click in the General tab and select Choose items.
    2. In the Choose Toolbox Items dialog that appears, the .NET Framework Components tab is selected by default. Click the Namespace column header to sort by namespace.
    3. The ActiveReports.Server.ReportControls namespace is at or near the top of the list. Select the checkbox next to Designer and click OK.
    4. The Designer control appears in your Visual Studio toolbox.
  2. Open the Design view of your Web Form and from the toolbox, drag and drop the Designer control onto the body section of the Web Form.
  3. On the message box that appears, click Yes to automatically add .svc files to your Web site to give the designer access to proxy services.

  4. You can resize the designer using the Properties grid by changing the Width property.
  5. So that the link at the top of the Designer will work for your Admin users, change the AdminPath property to the URL of your Admin site, for example, http://localhost:8080/Admin/.

To direct the Designer to the server used for ActiveReports Server

You can specify the security token and ActiveReports 11 Server host using code in a Global Application Class.

  1. From the Visual Studio Website menu, select Add New Item.
  2. In the Add New Item dialog that appears, select Global Application Class and click Add.
  3. In the Global.asax file that appears, provide a handler for the ResolveRemoteEndPoint event using code like the following in the Application Start event:

    To provide a handler for the event

    C# code. Paste INSIDE the Application_Start event.
    Copy Code
    ReportServiceProxy.ResolveRemoteEndpoint += ResolveRemoteEndpoint;
    
  4. Below the Application Language tag at the top of the file, import the Servicing namespace so that you can use the ReportServiceProxy using a directive like the following:

    To import the Servicing namespace

    ASP.NET code. Paste in the Global.asax file on the line BELOW the Application Language line.
    Copy Code
    <%@ Import Namespace="ActiveReports.Server.ReportControls.Servicing" %>
    
  5. Below the Application Start event, create the ResolveRemoteEndpoint event using code like the following, but with your address, user name, and password:

    To create the ResolveRemoteEndpoint event

    C# code. Paste in the Global.asax file AFTER the Application_Start event.
    Copy Code
        static void ResolveRemoteEndpoint(RemoteEndpoint remoteEndpoint)
        {
            remoteEndpoint.Address = "http://localhost:8080";
            remoteEndpoint.SecurityToken = "MySecurityToken";
        }
    

You can also specify the user name, password, and ActiveReports 11 Server host in your web application's web.config file.

  1. In the web.config file, provide a handler for the ResolveRemoteEndPoint event using code like the following.

    To provide a handler for the event

    C# code. Paste BETWEEN the <configSections> and </configSections> tags.
    Copy Code
        <sectionGroup name="activereports.server">
          <section name="reportServiceProxy" type="ActiveReports.Server.ReportControls.Configuration.ActiveReportsServerSection, 
          ActiveReports.Server.ReportControls, Version=x.x.xxxx.x, Culture=neutral, PublicKeyToken=d557f2f30a260da2" allowDefinition="Everywhere" />
        </sectionGroup>
    
  2. Below the Application Start event, create the ResolveRemoteEndpoint event using code like the following, but with your address, user name, and password

    To import the Servicing namespace

    ASP.NET code. Paste in the web.config file BELOW the </configSections> tag.
    Copy Code
      <activereports.server>
        <reportServiceProxy remoteReportServicePath="http://localhost:8080/" username="Admin" password="1" />
      </activereports.server>
    

 

See Also

Reference