This documentation is archived and is not being maintained.

Adding TextBox Controls to Hold Range Parameter Values

Visual Studio 2005

In this section, you add two TextBox controls to provide start and end date values at runtime to the OrderDateRange range parameter in the CustomerOrders subreport.

Note   If you implement this tutorial in a Web Site, the persistence of date values that users enter into the text boxes are maintained by ViewState.

To create and configure a redisplay Button on the form

  1. Open the Web or Windows Form.
  2. From the View menu, click Designer.
  3. If you are developing a Web Site, do the following:
    1. Click between the ListBox control and the Button control.
    2. Press ENTER three times to create two rows between the ListBox control and the Button control.
    3. In the first row created below the ListBox control, type "Order Start Date."
    4. In the second row created below the ListBox control, type "Order End Date."
  4. If you are developing a Windows project, do the following:
    1. From the Toolbox, drag two Label controls to the right of the ListBox control. Place one label above the other, with both of them above the Button control.
    2. Select the first Label control, and then from the Properties window, set the Text property to "Order Start Date."
    3. Select the second Label control, and then from the Properties window, set the Text property to "Order End Date."

The remaining steps apply to both Web and Windows projects.

  1. From the Toolbox, drag a TextBox control to the right of "Order Start Date."
  2. Click on the TextBox control to select it.
  3. From the Properties window, set the ID (or Name) to "orderStartDate."
  4. From the Toolbox, drag a TextBox control to the right of "Order End Date."
  5. Click on the TextBox control to select it.
  6. From the Properties window, set the ID (or Name) to "orderEndDate."
  7. From the File menu, select Save All.

Continue to Modifying Methods to Call the Subreport.

See Also

Tutorials: Reading and Setting Range Parameters for a Subreport | Tutorials and Sample Code | Tutorials' Sample Code Directory

Show: